Need to Divide the string into multiple integers
i have the String like below,that passed by user though one parameter.
200 300 400 500 600(This come from one parameter as a String with space between each value).
i need to use each above value in different column calculations.
anybody help me how can i divide whole string into multiple integer values and use it in other calculations.
Thanks in advance.
You will need to use substr and instr functions to get each value. The instr function returns the location of a space in your parameter value..
To get the first value, use this: <?xdofx:substr(AMOUNT,1,(Instr(AMOUNT,' ',1,1)-1))?>
To get second value: <?xdofx:substr(AMOUNT,Instr(AMOUNT,' ',1,1)+1, (Instr(AMOUNT,' ',1,2)-1)- Instr(AMOUNT,' ',1,1)+1)?>
To get third value: <?xdofx:substr(AMOUNT, Instr(AMOUNT,' ',1,2)+1, (Instr(AMOUNT,' ',1,3)- 1) -Instr(AMOUNT,' ',1,2)+1)?>
and so on..
Thanks,
Bipuser
Similar Messages
-
I need to divide selected row into multiple rows when i navigate ADF 11g
Hi
I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
I need to divide selected row into multiple rows when i navigate to other page . Scenario - in first page i'm displaying some records with columns like empno , empstatus , empworkdepts ,curdepts
Here empworkdepts gives the numeric number like no of departments work shifts 3 or 4 or 5. when i select any particular employee and fire next button to navigate next page.I have to divide the selected employee with same information into multiple times based on the empworkdepts value.
empno empstatus empworkdepts curdept
001 eds 2 TS
002 hr 1 FO
003 eds 4 TS
*004 eds 3 TS*
now i selected employee 004 , when i navigate to next page.
Empno EmpStatus EmpWorkDepts CurDept
004 eds 3 TS
004 eds 3 TS
004 eds 3 TS
i did with java code in bean .but not stable .
any help............
thanks advance.............
Edited by: user9010551 on May 5, 2010 10:48 PM
Edited by: user9010551 on May 10, 2010 11:31 PMuser9086775 wrote:
Hi Experts,
I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
Requirment:
This is a sample set record in a table
Product Sub Product Name Age
New Car Nissan Tom 49
New Car Nissan Jack 36
Old Car Audi Sam 24
Old Car Jaguar Pint 26
Old Car Audi Smith 41
I need to be able to fetch the above data in the below fashion
Product Sub Product Name Age
New Car
Nissan
Tom 49
Jack 36
Old Car
Audi
Sam 24
Smith 41
Jaguar Pint 26Please help with ideas as to how can i achive the above without using PLSQL.
Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
For example if you are in SQL Plus you can use the BREAK command. -
I have a group with114 member. Is there a limit to the number of members I can email at one time. do I need to make subgroups so everyone gets the information?
I'm not aware of any limitation in Mail, but many email providers have a limit on the number of addressees to help prevent spam. You might ask your email provider if they have a limit on how many addresses you can have in a single message.
Regards. -
Split the IDOC into multiple IDOC if the IDOC has more than 500 records
Hi All,
I developed an outbound IDOC in which we are facing an issue.
There is some limitation on the maximum idoc size it can handle.
If number of records is more than 500, split the idoc into multiple iDoc's, e.g. if it would have 1300 records , the result would be 2 iDoc's with 500 records, and the last one would have 300 records
How can i acheive this.
Regards
JaiHi,
1) first you need to know which message type/Idoc type you are triggering.
2) Get the Corresponding processcode from Partner profiles(WE20/ WE41).
3) Then the look for prper user-exit in the related processing FM.
4) write logic to split the IDoc accordingly.
if no proper user exit available then copy the standard processing FM and need to all ALE related configurations.
Catch hold any ABAP expert in your team to do all these.
Suresh -
Easy Question: How to split concatenated string into multiple rows?
Hi folks,
this might be an easy question.
How can I split a concatenated string into multiple rows using SQL query?
INPUT:
select 'AAA,BBB,CC,DDDD' as data from dualDelimiter = ','
Expected output:
data
AAA
BBB
CCC
DDDDI'm looking for something kind of "an opposite for 'sys_connect_by_path'" function.
Thanks,
TomasHere is the SUBSTR/INSTR version of the solution:
SQL> WITH test_data AS
2 (
3 SELECT ',' || 'AAA,BBB,CC,DDDD' || ',' AS DATA FROM DUAL
4 )
5 SELECT SUBSTR
6 (
7 DATA
8 , INSTR
9 (
10 DATA
11 , ','
12 , 1
13 , LEVEL
14 ) + 1
15 , INSTR
16 (
17 DATA
18 , ','
19 , 1
20 , LEVEL + 1
21 ) -
22 INSTR
23 (
24 DATA
25 , ','
26 , 1
27 , LEVEL
28 ) - 1
29 ) AS NEW_STRING
30 FROM test_data
31 CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(DATA,'[^,]','')) - 1
32 /
NEW_STRING
AAA
BBB
CC
DDDD -
My ipods disabled and it needs to connect to itunes. During the restore a window pops up and says i need to type the password into my ipod but i can't. what do i do?
Then try DFU mode and then restore.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings -
"Save as PDF" breaks up the document into multiple PDFs
Ever since my Lion install, when I open a doc in MSWord and try to "Save as PDF", it breaks up the document into multiple PDFs, not one saved PDF. Haven't seen this problem before. Anyone else experiencing this new "feature"?
What version of Word? It's working fine with my Word 2011 on Lion. (version 14.1.2. Applied SP1 and the .2 update.)
A workaround would be to print, then select the PDF dropdown in the lower corner of the print window.
Otherwise, you'll probably want to ask in the Microsoft forums, as Save As is using Word's programming code, not OSX's code like it does with the print function. -
How to divide the iview into frames?
Hi Experts,
Please tell me how to divide the iview into frames.Kindly provide the steps.Its urgent.
Regards,
NutanHi Nutan,
Now its clear!!
If I understand right. You want an overview page full of links to go to your different pages?
Or maybe you want a link form each page to go to another page?
In Portal Navigation through hyperlinks is possible.
You can either do that using EPCM.doNavigate("ROLES://...") {check for EPCM API of help.spa.com}
Or you could do that by simple
<a href="http://www.sdn.sap.com/irj/portal/myql">CLICK</a>
{check for Quicklinks on help.sap.com}
Either way you'll have to make a small JSP for that.
Hope this helped
If so kindly reward with points
Prem -
Do I have any function/way to divide the rows into un-equal size buckets?
Just like the function NTILE divides the rows into almost equal size buckets, do we have any way to divide the rows into un-equal (randomly decide) buckets so that eg. I can get 4 rows in bucket_1, 38 rows in bucket_2, 17 in bucket_3, ..... Only things is that each bucket should have rows from 1 to 50. (fixed limit).
with source_table as (select object_type, object_name from all_objects where rownum <= 100),
t as (select rownum as rn, s.* from source_table s),
cnt as (select count(*) cnt from t),
bucket as
( select bucket_id, bucket_width,
sum(bucket_width) over (order by bucket_id) - bucket_width + 1 as rn_start
from
( select level as bucket_id, ceil(dbms_random.value(0, 50)) as bucket_width
from cnt
connect by level <= cnt
select bucket_id, object_type, object_name from t, bucket
where rn between rn_start and rn_start + bucket_width - 1
order by bucket_id
; -
How to Splilit The String Into Single Column using Comma As Delimiter ?
How to Splilit The String Into Single Column using Comma As Delimiter ?
using Functionrefer my thread ,code is also available see if that helps you
error while executing the sp ORA-21779: duration not active -
Split a string into multiple internal tables
Hi all,
I need to split a string based internal table into multiple internal tables based on some sub strings in that string based internal table...
High priority help me out...
eg...
a | jhkhjk | kljdskj |lkjdlj |
b | kjhdkjh | kldjkj |
c | jndojkok |
d |
this data which is in the application server file is brought into a internal table as a text. Now i need to send 'a' to one internal table, 'b' to one internal table, so on... help me
<Priority downgraded>
Edited by: Suhas Saha on Oct 12, 2011 12:24 PMHi pradeep,
eg...
a | jhkhjk | kljdskj |lkjdlj |
b | kjhdkjh | kldjkj |
c | jndojkok |
d |
As per your statement "Now i need to send 'a' to one internal table, 'b' to one internal table"
Do you want only a to one internal table and b to one internal table
OR
Do you want the whole row of the internal table i mean
a | jhkhjk | kljdskj |lkjdlj | to 1 internal table
Having the case of an internal table which is of type string,
1) Loop through the internal table. LOOP AT lt_tab INTO lwa_tab.
2) Ge the work area contents and get the first char wa_tab-string+0(1)
3) FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE.
w_tabname = p_table.
CREATE DATA w_dref TYPE TABLE OF (w_tabname).
ASSIGN w_dref->* TO <t_itab>.
Follow the link
http://www.sap-img.com/ab030.htm
http://www.sapdev.co.uk/tips/dynamic-structure.htm
and then based on the sy-tabix values you will get that many number of internal table
<FS> = wa_tab-string+0(1)
append <FS>
OR
USE SPLIT statement at the relevant seperator
revert for further clarification
Thanks
Sri
Edited by: SRIKANTH P on Oct 12, 2011 12:36 PM -
I need help dividing an image into two equal parts in Adobe Illustrator CC--ASAP!!!
I need help dividing a single, already created image into 2 equal parts...Am getting nowhere so far
Hi Willi, thanks so much for responding! Below is the image I need to divide in half. The left half where it says "Click here for the definition" links to a landing page where people can read the definition of the Hebrew Word. The right half links to an audio recording of the Hebrew word being spoken aloud. I am trying to figure out how to use the scissors or knife tool in Adobe Illustrator and am having no luck. Plus I believe there's a way to include URLs on each separated part, but I can't get past figuring out how to cut it. My background is not graphic design
-
I am trying to shrink a microsoft word document from a standard page to a smaller, possibly half page, to create a printable reference booklet I plan on laminating but when I try to change the page to a different size, it doesn't shrink the document to that size, it just breaks that page into a bunch of smaller pages, breaking up whatever chart or words were on the page. Any insight?
Ex. I have a chart that looks like this on a standard letter size MS word doc page layout.
Header 1
Header 2
Header 3
Header 4
I want to change this so that is it on a landscape "half letter" MS word doc page size, shrinking the chart, and keeping it in tact.
When I change the page layout size, or try to copy paste to the above mentioned half letter doc size, the chart breaks up into multiple pieces, creating 3 or 4 "half letter" sizes, with only part of the chart on each.
Help MUCH appreciated!You'll need to create a custom page size under "Page setup..." in Word. Word really isn't the best application for what you're trying to do, but a custom page size with custom margins should work.
EDIT: Oh, and you'll need to change the sizes on your table, obviously.
Clinton
Message was edited by: clintonfrombirmingham -
Issue with splitting string into multiple lines
Hi Experts,
I have a long string s. I want to split this string into several lines each having 72 characters. For this I have done following programming:
String s = "For the first time it includes a supplementary report attempting to determine if extreme weather
events can be linked to human-induced climate change. The research team, including members
of the UK Met Office, identified recent episodes of extreme weather then used a computer to
estimate the likelihood of the episode happening in a world without increased CO2." ;
s = s.replaceAll("[\r\n]+", " ");
char[] sAr = s.toCharArray();
AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
int start = 0; // start with
int i = 72 ;
// for (int i = 71; i < sAr.length; i++) {
while (i < sAr.length) {
// { if (sAr[i] == ' ')
Bapitrtext Recepits7 = new Bapitrtext();
Recepits7.setTextid("TEXT");
Recepits7.setTextline(s.substring(start, i).replaceAll("[\r\n]+", ""));
RecepitsList7.add(Recepits7);
start = i+1;
i += 72;
input.setText(RecepitsList7);
The output of program is as below:
For the first time it includes a supplementary report attempting to dete
mine if extreme weather events can be linked to human-induced climate
hange. The research team, including members of the UK Met Office, iden
ified recent episodes of extreme weather then used a computer to estim
te the likelihood of the episode happening in a world without increased
Here as we can see last characters are getting deleted by program. For example in first line
determine 'r' is missing in extreme right.
In 3rd line c is missing in extreme left (word change is needed. Program
prints hange.
Also in 3rd line extreme right 't' is missing
Also in 4th line extreme right 'a' is missing
Also the last line is not being printed. In last line "CO2." " should appear.
There are two issues:
1. Why last word of each sentence is not being printed?
2. Why last sentence is not being printed?
I am struggling since last 2 days. Please help. I made all changes like replacing 72 by 71 etc.
By making such changes, I am able to print first line correctly. However under all cases
last character of 2nd line onward is not getting displayed.
Also last line is not getting displayed. I did every thing like using while instead of for loop etc.
Kindly help.
Regards,
Gary
Edited by: 945655 on Jul 10, 2012 11:39 PMString s = wdContext.currentContextElement().getExpense_Text();
s = s.replaceAll("[\r\n]+", " ");
char[] sAr = s.toCharArray();
AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
int start = 0; // start with
int i = 72;
while (i < sAr.length) {
Bapitrtext Recepits7 = new Bapitrtext();
Recepits7.setTextid("TEXT");
System.out.println(s.substring(start, i));
RecepitsList7.add(Recepits7);
start = i+1;
i += 72;
input.setText(RecepitsList7);
Edited by: 945655 on Jul 11, 2012 2:25 AM -
Need to split the output into files
Hi,
I have a query regarding splitting the output into different files. Please help to resolve that.
I have have select query query...
SELECT INDEX_NAME FROM DBA_INDEXES WHERE TABLE_NAME=<Table Name>;
If it returns less than 4 indexes then we have create one table and have to move those into the files.
For example...
File_1.sql
====
index1
index2
index3
If select statement returns more than 4 indexes then we have create 4 files and have to splict those indexes and has to move to those 4 files.
For example....
If select statement returns 13 records then...
File_1.sql File_2.sql File_3.sql File_4.sql
===== ====== ======= =======
index1 index4 index7 index10
index2 index5 index8 index11
index3 index6 index9 index12
index13
Index no need to be in order in any file and any file can I extra index in it.
Can be ok if we have any procedure or shell script. Please help me on this?
We are using 10.2.0.1 oracle db. Please let me know if you need any thing else?
Thanks
PathanAre you trying to put the output from SQL reports in different files?
Some reporting tools can do this.
You have a couple of options to do this.
Some reporting tools support the functinality to write to different files.
Another way is to write a PL/SQL procedure using UTL_FILE, which can open multiple files based on your conditions and to write to them as you need to.
An older, less elegant solution is to write nested SQL*PLUS scripts spooling to different files with the queries you need. A top level script would invoke the others, something like (untested)
--in first script
@subscript1
@subscript2
--in subscript1.sql
spool whatever.lst
select *
from dual;
...
Maybe you are looking for
-
JavaScript works in Pro but not Reader - NotAllowedError
I have created a web form in Adobe XI Pro. We have some progress bars at the top with number of fields completed type of thing. All of my JavaScript works perfectly in Acrobat. I save it like so Save As Other > Reader Extended PDF > Enable More Tools
-
How can I best upgrade basic to smartphone
I see lots of conflicting posts about upgrading and keeping a basic plan. I have 3 basic phones an a shareplan 700 that is long past it's 2 yr contract and only one phone uses text, for which I pay extra for limited texts. I qualify for upgrading al
-
Do I need the installation medium after installation?
Hello all, I just installed oes11 along with sles11 and, after fully patching the server, removed the installation dvd from the server. Now, everytime I open "OES Installation and Configuration" it prompts me to insert that dvd again... I thought aft
-
Why won't You Tube Videos Load/Play?
My 10 year old daughter has an ipad mini and has been able to watch You Tube videos with no problem. Now, all of a sudden, they won't load or if they load, they don't play. Can anyone tell me why this might happen? Everything else works fine, it's
-
TS3694 MSVCR80.dll not found
Down loaded the lastest version of Itunes & now get an error message MSVCR80.DLL not found. Itunes will not open. Reload software, still nothing. How do I fix this?