How to find out the number of occurence of special character
Hi ,
I have a string coming coming in I/p which is like '1;2;100;201;'
I need to break up this string and run my process for each value ( i.e for 1,2,100 and 201).
How i can know the count of number of occurences of ';' character?
How i can loop so that it runs once for each value?
1. Split, pre Oracle 10g...
===========================
with t as (select '10,aaaa,20,vvvvv,30,xxx''xx,12,12,56' txt from dual)
select substr( txt
, decode(level, 1, 1, instr(txt, ',', 1, level-1)+1)
, decode(instr(txt, ',', 1, level), 0, length(txt), instr(txt, ',', 1, level)
- decode(level, 1, 0, instr(txt, ',', 1, level-1))-1)
) val
from t
connect by level <= length(txt)-length(replace(txt,','))+1
VAL
10
aaaa
20
vvvvv
30
xxx'xx
12
12
56
9 rows selected.2. Split, 10g onwards using regular expressions
===============================================
with t as (select 'aaaa,,bbbb,cccc,dddd,eeee,ffff' as txt from dual)
-- end of sample data
select REGEXP_SUBSTR (txt, '[^,]+', 1, level)
from t
connect by level <= length(regexp_replace(txt,'[^,]*'))+1
REGEXP_SUBSTR(TXT,'[^,]+',1,LE
aaaa
bbbb
cccc
dddd
eeee
ffff
7 rows selected.example usage with varying IN clause...
SQL> ed
Wrote file afiedt.buf
1 select *
2 from emp
3 where ename in (
4 with t as (select '&input_string' as txt from dual)
5 select REGEXP_SUBSTR (txt, '[^,]+', 1, level)
6 from t
7 connect by level <= length(regexp_replace(txt,'[^,]*'))+1
8* )
SQL> /
Enter value for input_string: SCOTT,JAMES
old 4: with t as (select '&input_string' as txt from dual)
new 4: with t as (select 'SCOTT,JAMES' as txt from dual)
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7788 SCOTT ANALYST 7566 19-04-1987 00:00:00 3000 20
7900 JAMES CLERK 7698 03-12-1981 00:00:00 950 30
SQL>3. Split 10g onwards using XMLTABLE...
======================================
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'This is some sample text that needs splitting into words' as txt from dual)
2 select x.*
3 from t
4 ,xmltable('x/y'
5 passing xmltype('<x><y>'||replace(t.txt,' ','</y><y>')||'</y></x>')
6 columns word varchar2(20) path '.'
7* ) x
SQL> /
WORD
This
is
some
sample
text
that
needs
splitting
into
words
10 rows selected.
Similar Messages
-
How to find out the Number range object for Incident number
How to find out the Number range object for Incident number ?
CCIHT_IAL-IALID
regards,
lavanyaHI, an example.
data: vl_num type i,
vl_char(6) type c,
vl_qty type INRI-QUANTITY,
vl_rc type INRI-RETURNCODE.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'ZRG0000001'
QUANTITY = '1'
SUBOBJECT = ' '
TOYEAR = '0000'
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = vl_num
QUANTITY = vl_qty
RETURNCODE = vl_rc
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
vl_char = vl_num.
write vl_char.
Regard -
How to find out the number of songs in my iTunes 11 library
How to find out the number of songs in my iTunes 11 library
Welcome to the Apple Support Communities
To see the number of songs, go to View menu > Show Status Bar, so the number of songs you have will appear at the bottom of the iTunes window -
How do find out the number of rows
how to find out the number of rows of as all tables in a schema with one sql statement
Hi,
What u can try doing is...
declare
numrows number;
begin
for i in (select tname from tab)
loop
execute immideate 'select count(1) into numrows from ' | | i.tname ;
dbms_output.put_line(numrows);
end loop;
end;
Hope this helps. This works only in 8i. So if u need to do the same in 8.0 u have to use dbms_sql pkg.
The logic is same but the way u open ands execute the code is a bit diff.
Best Of Luck.
Regards,
Ganesh R -
How to find out the number of threads created under java vm at runtime
our application seems to have hit the max number of threads that can be created under vm and the vm will just hang after that. that behavior seems to be consistent from an article that I read earlier.
I wonder any way that java app can find out the number of threads currently created under vm?
thanks in advance!If you are not starting an extra thread group you can use the Thread.activeCount method. But this willnot return all the threads, as there are some jvm threads, i.e. garbage collector. Also if you are running on a Unix type operating system then you can send a signal to the jvm to give you a thread dump, i think the signal is sighup.
If the application is hanging i would of thought that you have a deadlock situation rather then the JVM not being able to create new threads, roughly how many threads should be running ?? -
How to find out the number of fields in generated proxy structure?
Hi All,
Can anybody help me to find out the number of fields in generated proxy structure in back end system along with controller fields.
i know how to get number of fields in XI system but i want the number of fields in back end system when we generate proxy including automatically generated controller fields.
Thanks in advance.
Regards,
UjwalkumarU mean u want to know at runtime?
Get the output from ur proxy as a string, count the number of "<" characters and divide it by 2. :-P
Of course, you'll have to treat the header fields separately.
Regards,
Henrique. -
Java Comiler - How to find out the Number of lines of Executable code
Hello,
Is there any option we have or could have to get the "Number of Lines of Executable Code" while we run the java compiler?
Technically Java is an interpreter. So in case the term is incorrect, please excuse me.
Since the compiler anyway traverses through the Java files, it is easy and correct to get the number from the compiler rather than having any external tool calculating the same.
It should remove the comments, blank lines and take care of java single sentence written in multiple lines.
Any suggestions or help is highly appreciated.
regards,
SabyasachiHow many lines of code are there in this program?
public class sabre20110211 {public static void main(String[] args) {for (int i = 0; i < 10; i++)System.out.println(i);}}And how many in this program?
public
class
sabre20110211
public
static
void
main(
String[]
args
for
(int i = 0;
i < 10;
i++
System.out.println(i);
} -
How can I find out the number of lines in a text file?
How can I find out the number of lines in a text file?
java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( "YourFile.txt" ) );
int lineCount = 0;
while( in.readLine() != null )
lineCount ++;
System.out.println( "Line Count = " + lineCount ); -
How can I find out the number of pixels a photo has in i photo.
How can I find out the number of pixels a photo has in iphoto.
Do you mean in iPhoto on the MacBook Pro?
The dimensions (width and height iin pixels)are shown in the "Info" panel - multiply the two numbers:
Regards
Léonie
P.S: on an IOS device you see the same information in iPhoto, when you select the photo in an album and click th Info button ( i ). -
How to find out the Idoc number triggered for any material transfer frm SAP
Hi Folks,
Can any body let me know How to find out the Idoc number triggered for any material transfer frm SAP?
Do we have any navigation for that in MM03?
Thanks,
SPMD.Hi Shabbirmdpasha,
If you know the user name then you can find the idoc numbers created by that user. But the problem here is it not only gives the material it gives all the idocs created by that user. Go to SE16 --> table name EDIDS --> here you can fill the approximate date and in UNAME give the userid and execute. This will give all the idocs created by that user. I know it is only a partial solution.
Also would suggest to post the same in abap forums for more answers:
ABAP Development
Regards,
---Satish -
How to find out the IDOC number(urgent)
hello every one,
i had recived all the data to BW from R/3 but the request is still running in the system
for this <b>i need to manually release the IDOC for BD87</b>
can any one please help me <b>How to find out the Idoc Number in R/3 and In BW for the particular load</b>
Regards
Sandyhi Siva,
thanks for ur valuable answer,
it is showing IDoc num for the succeeded one....
my present error is Data pack 1 got error and Datapack 2 was success,
their 3IDocs are their in detail tab all are success
as per my knowledge it will for the Data pack 2 and it is showing 3different
how can i find the Idoc which was struck .....
that need to process manually in BD87..
please suggest if i am wrong
Regards
Sandy -
How should I find out the number of messages on queue?
I am using iMQ 3.0. Point-to-point messaging.
I have sent some messages to the queue. How should I
find out the number of messages on queue ?You can use MQ's admin tools (imqcmd or imqadmin)
to find that out.
'imqcmd query dst -n queuename -t q' will print out what
you want.
Check the administration guide for more info. -
How to find out the n number of records inserted??
In File to JDBC Scenarios, i am inserting n records in Oracle.
How to find out the n number of records inserted??Hi,
If you are using the statement "UPDATE_INSERT", get the response on element <insert_count>count</insert_count>. It will give you the inserted rows.
This link can be very helpfull.
[http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm]
regards.
roberti -
How to find out the Transactions used per month & the USER who used that
Hi,
1)How to find out the Transactions used per month & the USER who used that?
2)and can i get the above same for minimum 20 month?
System : SAP- Enterprise Core Component.You can use my program...
*& Report Z_ABAP_TCODE_MONITOR
*****& Program Type : Report *
*****& Title : Z_ABAP_TCODE_MONITOR *
*****& Transaction code : ZTCODE_USAGE *
*****& Developer name : Shailendra Kolakaluri *
*****& Deveopment start date : 26 th Dec 2011 *
*****& Development Package : ZDEV *
*****& Transport No : DEVK906086 *
*****& Program Description : This program is to display
*List all tcodes executed during previous day.
*& Show the number of users executing tcodes
*& Modification history
REPORT Z_ABAP_TCODE_MONITOR.
*& List all tcodes executed during previous day.
*& Show the number of users executing tcodes
TYPE-POOLS : slis.
DATA: ind TYPE i,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
layout TYPE slis_layout_alv,
variant TYPE disvariant,
events TYPE slis_t_event WITH HEADER LINE,
heading TYPE slis_t_listheader WITH HEADER LINE.
*REPORT z_report_usage.
TYPES: BEGIN OF zusertcode,
date TYPE swncdatum,
user TYPE swncuname,
mandt TYPE swncmandt,
tcode TYPE swnctcode,
report TYPE swncreportname,
count TYPE swncshcnt,
END OF zusertcode.
*data : date type n.
DATA: t_usertcode TYPE swnc_t_aggusertcode,
wa_usertcode TYPE swncaggusertcode,
wa TYPE zusertcode,
t_ut TYPE STANDARD TABLE OF zusertcode,
wa_result TYPE zusertcode,
t_result TYPE STANDARD TABLE OF zusertcode.
PARAMETER: month TYPE dats DEFAULT sy-datum.
*PARAMETER: date TYPE dats.
*select-options : username for wa_usertcode-account.
START-OF-SELECTION.
PERFORM get_data.
PERFORM get_fieldcatalog.
PERFORM set_layout.
PERFORM get_event.
PERFORM get_comment.
PERFORM display_data.
FORM get_data .
*date = sy-datum - 2 .
After start-of-selection add this line (parameter Month required 01 as day).
concatenate month+0(6) '01' into month.
CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
EXPORTING
component = 'TOTAL'
ASSIGNDSYS = 'DEV'
periodtype = 'M'
periodstrt = month
TABLES
usertcode = t_usertcode
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
wa-date = month.
*wa-date = date.
wa-mandt = sy-mandt.
wa_usertcode-account = username.
LOOP AT t_usertcode INTO wa_usertcode.
wa-user = wa_usertcode-account.
IF wa_usertcode-entry_id+72 = 'T'.
wa-tcode = wa_usertcode-entry_id.
wa-report = space.
ELSE.
wa-tcode = space.
wa-report = wa_usertcode-entry_id.
ENDIF.
COLLECT wa INTO t_ut.
ENDLOOP.
SORT t_ut BY report ASCENDING.
CLEAR: wa, wa_result.
endform.
FORM get_fieldcatalog .
fcat-tabname = 't_ut'.
fcat-fieldname = 'DATE'.
fcat-seltext_l = 'Date'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'MANDT'.
fcat-seltext_l = 'Client'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'USER'.
fcat-seltext_l = 'User Name'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'TCODE'.
fcat-seltext_l = 'Transaction Code'.
fcat-key = 'X'.
APPEND fcat.
ENDFORM.
*& Form SET_LAYOUT
text
--> p1 text
<-- p2 text
FORM set_layout .
layout-colwidth_optimize = 'X'.
ENDFORM. " SET_LAYOUT
*& Form GET_EVENT
text
--> p1 text
<-- p2 text
*FORM get_event .
events-name = slis_ev_top_of_page.
events-form = 'TOP_OF_PAGE'.
APPEND events.
*ENDFORM. " GET_EVENT
**& Form GET_COMMENT
text
--> p1 text
<-- p2 text
*FORM get_comment .
DATA: text(30).
text = 'Billing Report'.
heading-typ = 'H'.
heading-info = text.
APPEND heading.
*ENDFORM. " GET_COMMENT
**& Form top_of_page
text
--> p1 text
<-- p2 text
*FORM top_of_page .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading[]
I_LOGO =
I_END_OF_LIST_GRID =
*ENDFORM. " top_of_page
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
sort t_ut[].
DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = layout
it_fieldcat = fcat[]
i_save = 'A'
is_variant = variant
it_events = events[]
TABLES
t_outtab = t_ut
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " DISPLAY_DATA -
How to find out the "manufacture date"?
Hello!
Can you tell me how to find out the manufacture date of my Satellite A110-334 with the serial "SY6224123K"?
I need this information for my insurance!
I found only this link for HDD`s: http://www.storage.toshiba.eu/index_manual.php?pid=220&sid=536&la=en
But there is no "S" on the first digit!??
So it is maybe "Y6" which can be November 2006! Is this right?
Thank you!
===========
This is the information on the link above:
How to encode a Toshiba Hard Disk Drive Serial Number?
The Toshiba serial number (S/N) includes details of the date of manufacture. The first digit of the serial number indicates the Month of manufacture and the 2nd digit indicates the Year.
Example:
M Y x x x x x x x
M = Month
Y = Year
The month digit goes from 1, for January, through to 9, for September, and then X, Y and Z, for October, November and December.
Examples:
2 8 1 7 0 0 0 1 A
2 = February
8 = 1998
3 0 5 4 4 3 0 6 T
3 = March
0 = 2000
X 9 D 7 8 3 3 1 T
X = October
9 = 1999
The remaining digits contain information about factory and production line, and some digits are reserved for a continuously running serial number.Hello
Try with http://gedb.toshiba.com/
Let me know if you find info you need.
Maybe you are looking for
-
Active Directory Web Services Event 1202
Hi all, I am stuck with the event 1202 (source ADWS) error on my ADLDS server hosting sharepoint extranet user repository. My sharepoint server is a domain member but NOT a domain controller. I do not replicate this ADLDS instance with any other serv
-
Please help...excel to html
Dear, I have a assignment about java. My platform is red hat linux, jsp, tomcat server. I don't know how to upload a excel file and display this in browser. The main problem is that how to convert excel file into html format or anyother method? that
-
How to add a new output type in sales order header via ABAP program
Hi All, I have to add new output type (ex Z001) in sales order header via an ABAP program. please let me know how to do this. Thank you all in advance.
-
The never ending question....
I upgraded multiple songs today on iTunes Plus. I received multiple server error messages during the multiple attempts today. One time I quit iTunes during one of my futile upgrade attempts and iTunes told me that it would check for my purchases next
-
Need Help On Statement.......
I'm currently stuck with this statement: Container container = getContentPane( ); What is a container ? And what is the function getContainPane? And what is a Pane? Please help me...................................