QUERY WHICH COUNTS NUMBER OF TIMES WORDS/LETTER APPEAR IN SENTENCE - Thanks
I have this query below
it gives the number of times a txn is hign comfort and Approved
.. nyumber of times txn is meduim comfort and approved etc.
There is a futher line whihc shows the number of times txn is blacklisted BL COUNT.
I am trying to get line of query which can show me the number of times txn is approved, is high comfort and blcklisted ( the same applies for
wl - watch listed)
The query i am using
SUM
(CASE
WHEN cc.Comment
LIKE ('BL(%') and cc.Comment
LIKE ('Approved%')
AND cc.Comment
LIKE ('%ComfortLevel=High Comfort%')
THEN 1
ELSE 0 END)AS hbcl - NO RESULTS BEING GIVEN
pLEASE CAN ANYONE HELP,. THANKS
QUERY
USE RiskManagementReporting
GO
DECLARE
@StartDate DATETIME,
@EndDate DATETIME
SET @StartDate
= '2014-01-01 00:00:00'
SET @EndDate
= '2014-03-31 23:59:59'
SELECT
CONVERT
(VARCHAR(10),
mt.OPacket_TransactionTime, 102)
AS [Date],
SUM
(CASE
WHEN cc.Comment
LIKE ('Approved%')
AND cc.Comment
LIKE ('%ComfortLevel=High Comfort%')
THEN 1 ELSE 0
END) AS [A - HighC],
SUM
(CASE
WHEN cc.Comment
LIKE ('Approved%')
AND cc.Comment
LIKE ('%ComfortLevel=Medium Comfort%')
THEN 1 ELSE 0
END) AS [A - MediumC],
SUM
(CASE
WHEN cc.Comment
LIKE ('Approved%')
AND cc.Comment
LIKE ('%ComfortLevel=Low Comfort%')
THEN 1 ELSE 0
END) AS [A - LowC],
SUM
(CASE
WHEN cc.Comment
LIKE ('Declined%')
AND cc.Comment
LIKE ('%ComfortLevel=Low Risk%')
THEN 1 ELSE 0
END) AS [D - LowR],
SUM
(CASE
WHEN cc.Comment
LIKE ('Declined%')
AND cc.Comment
LIKE ('%ComfortLevel=Medium Risk%')
THEN 1 ELSE 0
END) AS [D - MediumR],
SUM
(CASE
WHEN cc.Comment
LIKE ('Declined%')
AND cc.Comment
LIKE ('%ComfortLevel=High Risk%')
THEN 1 ELSE 0
END) AS [D - HighR],
SUM
(CASE
WHEN cc.Comment
LIKE ('BL(%')
THEN 1 ELSE 0
END) AS [BL Count],
SUM
(CASE
WHEN cc.Comment
LIKE ('WL(%')
THEN 1 ELSE 0
END) AS [WL Count],
SUM
(CASE
WHEN cc.Comment
LIKE ('Marked as Touched%')
THEN 1 ELSE 0
END) AS [Touched by DRT],
COUNT
(mt.csnTransactionId)
AS [Sent to DRT]
FROM MatchedTransaction mt
WITH (NOLOCK)
LEFT
JOIN CustomerComment cc
WITH (NOLOCK)
ON (mt.csnTransactionId
= cc.SenderMTCN
AND cc.InsertDate
BETWEEN @StartDate AND
DATEADD (D, 1, @EndDate)
I have adjusted this as
SUM
(CASE
WHEN cc.Comment
LIKE ('Approved%')
AND cc.Comment
LIKE ('%ComfortLevel=High Comfort%')
AND cc.Comment
LIKE ('%BL(%')THEN 1
ELSE 0 END)
AS hcbl,
Still no result
Similar Messages
-
Count number of times each char appears??
Hi! I'm trying to figure out, how to count the number of times ech character appears in the text using ascii code??
Go the text character-by-character, and count each character. It's that simple.
The only remotely hard part is holding your character counters. You could use a Map.
But if you know that the characters are always going to be ASCII, then there's only going to be 128 of them.
So an array of int with 128 elements should be sufficient.
Those are more than enough hints. Go do your homework now. -
Hi
I need to count the no.of words in a particular sentence....I need a program in PL/SQL......Please any one help me.......
Regards,
Sankar.Csql>declare
i number := 0;
j varchar2(2000);
x varchar2(2000) := '1234567890123456789';
begin
loop
i := i+1;
select substr(x,i)
into j
from dual;
if j is null then
exit;
end if;
end loop;
dbms_output.put_line(to_char(i-1));
end;
19
PL/SQL procedure successfully completed.
jeneesh -
Find the Number of times a '¯'character appears in a string.
Hi,
In my staging table I am having data like below
ABL¯ABL¯0¯0¯ABL¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ABQ¯480¯825¯DLS¯AMA¯ABQ¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ACD¯808¯1255¯DLS¯ELP¯TCS¯PHX¯ACD¯ ¯ ¯ ¯ ¯
ABL¯ADE¯1256¯471¯DLS¯AMA¯ABQ¯LSV¯ADE¯ ¯ ¯ ¯ ¯
ABL¯AFT¯1140¯1744¯DLS¯LAX¯FON¯AFT¯ ¯ ¯ ¯ ¯ ¯
ABL¯AHM¯1178¯1637¯DLS¯LAX¯AHM¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ALB¯1769¯1825¯DLS¯WIL¯ALB¯ ¯ ¯ ¯ ¯ ¯ ¯
ABL¯ALE¯1041¯1150¯DLS¯ALE¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
Now I want to find the Number of times a '¯'character appears in a string.
I should get output 14
thanks & regards,
Vipin Jha
Thankx & regards, Vipin jha MCPHi Vipin,
You can try below sql code also
code:- len(data)-len(replace(data,'¯','')) -(len(data)-len(replace(data,' ','')))
select data,len(data)-len(replace(data,'¯','')) -(len(data)-len(replace(data,' ',''))) CountofCharacter from
select 'ABL¯ABL¯0¯0¯ABL¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ' data
UNION
SELECT 'ABL¯ABQ¯480¯825¯DLS¯AMA¯ABQ¯ ¯ ¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯ACD¯808¯1255¯DLS¯ELP¯TCS¯PHX¯ACD¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯ADE¯1256¯471¯DLS¯AMA¯ABQ¯LSV¯ADE¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯AFT¯1140¯1744¯DLS¯LAX¯FON¯AFT¯ ¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯AHM¯1178¯1637¯DLS¯LAX¯AHM¯ ¯ ¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯ALB¯1769¯1825¯DLS¯WIL¯ALB¯ ¯ ¯ ¯ ¯ ¯ ¯ '
UNION
SELECT 'ABL¯ALE¯1041¯1150¯DLS¯ALE¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯'
) t
Thanks
Prasad -
Count number of times a specific element occurs in ArrayList
I need to count the number of times a specific element occurs in an ArrayList. For example, if an ArrayList 'overflow' consists of the following elements:
1,3,4,1,1,8,14,7,3,7,8,0.
I need to count the number of times 4 occurs in the list.
ArrayList overflow = new ArrayList();
if(overflow.contains(4))
}I know that contains returns true if 4 exists in the ArrayList, but how do I count the number of times 4 occurs? Any help will be appreciated. Thank you.There is the Collections.frequency method in j2se 1.5
Or you could loop through the values in the ArrayList and count the number of times it occurs. -
Count number of times an instructor has taught a class
Howdy Folks, I'm using a lifeline to see if i can get some help for a question. I apologoze in advance, i know this is a numbers forum, but i am working with an excel spreadsheet and was hopng someone could give me a push in the right direction. i want to count how many times an instructor has taught a class based on dates. The spreadsheet is filled out via an applescript so the instructor's name appears with every student. I've been trying to use the count if formula in excel but i cant make it work. any suggestions? it should count james as 2 since he taught classes on two different dates, and nub as 1. all information is fictional and used for demo pruposes.
This will work for you... I hope:
I had to add three columns to your existing table, then crete a second table (on the right) to summarize:
The three columns can be anywhere but I added then right after column G
The table on the right in this example will have to be a new sheet in excel. On a mac Numbers is free (If you have Mavericks) so maybe you want to try to download from the App store.
H2=IF(COUNTIF( $H$1:H1, F2&"-"&E2)=0, F2&"-"&E2, "")
this is shorthand for... select cell H2, then type (or copy and paste from here) the formula:
=IF(COUNTIF( $H$1:H1, F2&"-"&E2)=0, F2&"-"&E2, "")
I2=IF(H2="", "", MAX($I$1:I1)+1)
J2=IF(COUNTIF($F$1:F1,F2)>0, "", MAX($J$1:J1)+1)
select H2 thru J2, copy
select H2 thru the end of column J
paste
In the new table (for Numbers) or sheet(in excel):
A2=IF((ROW()−2)<MAX(Table 2::J), OFFSET(Table 2::$F$2,MATCH(ROW()−1, Table 2::J,0), 0),"")
B2=IF(A2≠"", COUNTIFS(Table 2::F, A2, Table 2::I, ">0"), "")
select A2 and B2, copy
fill down as needed -
Calculate number of times a name appears within a date range.
Hello,
I am actually using the iPad version but I assume the formula will be the same. Say I have a date in column A and a list of names in column B. What would the formula be to calculate the number of times a specific name appears in a date range.
Thank youIf C2 = the minimum date of the range
C3= the maximum date of the range
and you are looking for John as the name
=COUNTIFS($A,">="&C2,$A,"<="&C3,B,"john")
which counts cells where A>=the min date and A<=the max date and B="john" -
Calculate the number of times a character appears in a string
Please help.
Is there a way to count a number of occurences of a particular character in a string? e.g. If you have 'DATABASE' as a string, can you calculate the number of times 'A' occurs in it? The answer is supposed to be 3, but can you calculate it in Oracle?
Thanks in advance.Re: Any built-ins for occurance
-
SQL query to count number of VMs
In OVM 2.2 I could run a SQL query against the OVM database to count the number of VMs that I had created, for automated reporting purposes.
I've looked at the 3.1 OVM database and it looks like most of the data is kept in BLOB columns. So does anyone know how I might query the 3.1 database to count the number of VMs?
Thanks.Hi,
Combine the relevant data from the three tables (using UNION ALL) in a sub-query. without the GROUP BY.
Your main query can select from the sub-query's result set, as if it were a table. Do the GROUP BY in the main query.
That is:
WITH u AS
SELECT TO_CHAR (emp_start, 'YYYY') AS yr FROM Adminstaff
UNION ALL
SELECT TO_CHAR (emp_start, 'YYYY') AS yr FROM Clerk
UNION ALL
SELECT TO_CHAR (emp_start, 'YYYY') AS yr FROM ITstaff
SELECT COUNT (*) AS cnt
, yr
FROM u
GROUP BY yr
ORDER BY cnt DESC
;Since empno is the primary key, it's easier not to mention empno at all in the sub-query, and use "COUNT (*)" instead of "COUNT (empno)" in the main query. The results are the same.
It might be a little more efficient to GROUP BY in all three branches of the sub-query, and then to SUM the results in another GROUP BY in the main query. That means more code, of course, which I'll leave as an exercise for you.
Why do you have three separate tables? I can understand that nobody else wants to be near the IT Staff, but it seems like lots of things (including this job) would be a lot simpler if all employees were all in one table, with a column to designate to which group (Adminstaff, Clerk or ITStaff) each one belongs. -
Count Number of Times an App ls Launched/Used
Anyone know if there's an app and/or API or something that would let you know how many times another application-- or actually all other applications-- were either (a) launched (first time) and (b) brought to the foreground (used more than once)? I did a forum search here and couldn't find any reference, and maybe it's more of a developer question, just thought someone might have heard of an existing app that already does something like it or know if there's an existing API call that would allow it. Thx KV
James should show 2 classes and nub should show 1 class. sorry
-
SQL Query...number to time
Hi,
I want to know how to a convert number (say, 54678) into hh:mi:ss format.
Any help.
Thanks.You can test/troubleshoot it. This may or may not be perfect, you need to reverse engineer it and find (any) mistakes/logic errors. Hint: there is one.
set serveroutput on
create or replace procedure get_time (sod in number) as
v_diff number;
v_current number;
v_date date;
begin
v_current := to_number(to_char(sysdate,'SSSSS'));
-- dbms_output.put_line('v_current is '||v_current);
v_diff := v_current - sod;
-- dbms_output.put_line('v_diff is '||v_diff);
--evaluate the difference
if v_diff < 0 then
--means number of seconds is in the future
v_date := sysdate - v_diff/86400;
elsif v_diff > 0 then
--means sod is in the past
v_date := sysdate + v_diff/86400;
else
--means you got lucky
v_date := sysdate;
end if;
dbms_output.put_line('At the tone, the time is '||to_char(v_date,'HH:MI:SS PM'));
end;
exec get_time(54678);
At the tone, the time is 03:11:18 PM
PL/SQL procedure successfully completed.Message was edited by:
stevencallan
Message was edited by:
stevencallan -
Very slow performance
Even after shutting it down and restarting still the same.
Laggin a lot
Please help!!!First, back up all data immediately, as your boot drive might be failing.
A possible cause of a slow user interface is a large set of image or video files on the Desktop with preview icons. If you have more than a dozen or so such files, move them to another folder.
Another possible cause is iCloud activity, especially Photo Stream synchronization. If applicable, uncheck all boxes in the iCloud preference pane and see whether there's an improvement.
Otherwise take the steps below when you notice the slowdown.
Step 1
Launch the Activity Monitor application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
Select the CPU tab of the Activity Monitor window.
Select All Processes from the menu in the toolbar, if not already selected.
Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
Next, select the Disk Activity tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in and Writes out.)
Step 2
If you have more than one user account, you must be logged in as an administrator to carry out this step.
Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
Select the 50 or so most recent entries in the log. Copy them (command-C) to the Clipboard. Paste (command-V) into a reply to this message. You're looking for entries at the end of the log, not at the beginning.
When posting a log extract, be selective. Don't post more than is requested.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long. -
Need to count the number of times the Basic Finish data chages
HI Expertes,
I have a requirement I need to count number of times the Basic finish date chaged for PM work order. I went throug our forums I got some info like using a standard function module
CHANGEDOCUMENT_READ_HDRS_ONLY
CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS
But all the above function module will not be suitable for my requirement since CHANGEDOCUMENT_READ_HDRS_ONLY it gives whole changes but my requirement is just need number of changes occurred in Basic Finish date but CHANGEDOCUMENT_READ_POSITIONS can give the filed number which has been changed but still I need change id.
So kindly suggest me wether there is any other Standard FM to get number of changes occurred in Basic Finish date?
Thanks,
RajeshHi Debbie,
To count the number of groups please try the folling steps:
1) Create a formula @reset and place this formula in the page header
whileprintingrecords;
numbervar i:=0;
2) Create another formula @evalgroup place this in the group header where you want to count the values.
whileprintingrecords;
numbervar i:= i+1;
3) Create another formula @display and place this in report footer.
whileprintingrecords;
numbervar i;
In order to display the count of details which are printing in the detail section place the eval formula in the detail section and the @display formula in the group footer.
Hope this helps!!!
Regards,
Vinay -
Fine tunning the query which uses /*+ USE_CONCAT */ table hint
Some of the queries in our application uses the /*+ USE_CONCAT */ table hint which takes huge time for the execution in Oracle database.when we fire the below query in 250Million production database it takes approx.3min for the execution.
Because of this we are facing a performance issue in the application.
Below is the sample query :
SELECT /*+ USE_CONCAT */ * FROM DI_MATCH_KEY WHERE NORM_COUNTRY_CD = 'US'
AND ((( NORM_CONAME_KEY1 ='WILM I' OR NORM_CONAME_KEY2 = 'WILM I' OR NORM_CONAME_KEY23 = 'WILM I'
OR NORM_CONAME_KEYFIRST ='WILLIAM' ) AND NORM_STATE_PROVINCE = 'CA' ) OR NORM_ADDR_KEY2 = 'CALMN 12 3 OSAI')
Regarding the indexes almost for all the columns combination for the above sql index already created in table.
Your suggestions will be appreciated
Thanks,
Regards,
Krishna kumarHi,
Thanks for our valuable inputs.
As suggested find attached explain plan and trace file details in the excel sheet.
TRACE FILE:
<pre>
TKPROF: Release 10.2.0.1.0 - Production on Thu Feb 14 11:11:59 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: implhr01_ora_26457.trc
Sort options: prsela exeela fchela
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
SELECT /*+ USE_CONCAT */ COUNT(*) FROM DI_MATCH_KEY WHERE NORM_COUNTRY_CD = 'US'
AND ((( NORM_CONAME_KEY1 ='WILM I' OR NORM_CONAME_KEY2 = 'WILM I' OR NORM_CONAME_KEY23 = 'WILM I'
OR NORM_CONAME_KEYFIRST ='WILLIAM' ) AND NORM_STATE_PROVINCE = 'CA' ) OR NORM_ADDR_KEY2 = 'CALMN 12 3 OSAI')
call count cpu elapsed disk query current rows
Parse 1 0.03 0.05 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 3.97 65.43 30633 64053 0 1
total 4 4.00 65.49 30633 64053 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 76
Rows Row Source Operation
1 SORT AGGREGATE (cr=64053 pr=30633 pw=0 time=65436584 us)
73914 CONCATENATION (cr=64053 pr=30633 pw=0 time=61623673 us)
0 TABLE ACCESS BY INDEX ROWID DI_MATCH_KEY (cr=4 pr=2 pw=0 time=32617 us)
0 INDEX RANGE SCAN MKADDR_KEY2 (cr=4 pr=2 pw=0 time=32599 us)(object id 122583)
75 TABLE ACCESS BY INDEX ROWID DI_MATCH_KEY (cr=80 pr=20 pw=0 time=1369427 us)
75 INDEX RANGE SCAN MK_CY_KEY1_ST_PROV (cr=5 pr=0 pw=0 time=2119 us)(object id 122666)
2 TABLE ACCESS BY INDEX ROWID DI_MATCH_KEY (cr=81 pr=2 pw=0 time=26723 us)
77 INDEX RANGE SCAN MK_CY_KEY2_ST_PROV (cr=4 pr=0 pw=0 time=3641 us)(object id 122667)
2 TABLE ACCESS BY INDEX ROWID DI_MATCH_KEY (cr=6 pr=0 pw=0 time=47 us)
2 INDEX RANGE SCAN MK_CY_KEY1_AGN (cr=4 pr=0 pw=0 time=28 us)(object id 122670)
73835 TABLE ACCESS BY INDEX ROWID DI_MATCH_KEY (cr=63882 pr=30609 pw=0 time=61503773 us)
73905 INDEX RANGE SCAN MK_CY_KEY2_AGN (cr=266 pr=176 pw=0 time=148198 us)(object id 122745)
alter session set sql_trace true
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 1 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 76
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.03 0.05 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 2 3.97 65.43 30633 64053 0 1
total 5 4.00 65.50 30633 64053 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.05 0.03 0 0 0 0
Execute 23 0.05 0.08 0 0 0 0
Fetch 98 0.01 0.01 0 137 0 76
total 130 0.11 0.13 0 137 0 76
Misses in library cache during parse: 9
Misses in library cache during execute: 9
2 user SQL statements in session.
23 internal SQL statements in session.
25 SQL statements in session.
Trace file: implhr01_ora_26457.trc
Trace file compatibility: 10.01.00
Sort options: prsela exeela fchela
1 session in tracefile.
2 user SQL statements in trace file.
23 internal SQL statements in trace file.
25 SQL statements in trace file.
11 unique SQL statements in trace file.
561 lines in trace file.
91 elapsed seconds in trace file.
</pre>
EXPLAIN PLAN:
<pre>
ID OPERATION OBJECT_NAME CARDINALITY BYTES COST CPU_COST
0 SELECT STATEMENT 1 53 1886 15753172
1 SORT 1 53
2 CONCATENATION
3 TABLE ACCESS DI_MATCH_KEY 8 424 10 78334
4 INDEX MKADDR_KEY2 8 4 30086
5 TABLE ACCESS DI_MATCH_KEY 3 159 7 53574
6 INDEX MK_CY_KEY1_ST_PROV 3 4 29286
7 TABLE ACCESS DI_MATCH_KEY 3 159 7 53740
8 INDEX MK_CY_KEY2_ST_PROV 3 4 29286
9 TABLE ACCESS DI_MATCH_KEY 5 265 7 55941
10 INDEX MK_CY_KEY1_AGN 5 4 29686
11 TABLE ACCESS DI_MATCH_KEY 2192 116176 1855 15511582
12 INDEX MK_CY_KEY2_AGN 2228 12 524136
</pre>
Kindly help us regarding this.
Thanks,
Krishna Kumar. -
Generate numbers in incremental order, the number of times condition met?
I have tried explaining my problem here also.
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=31&t=007531&p=1
But trying to put in other words now.
I have a NO tag which appears many times in xml. and alwyas have some random numbers displaying.
output looks something similar to this
something......<NO>1</NO>
something......<NO>1</NO>
something......<NO>2</NO>
something......<NO>1</NO>
something......<NO>3</NO>
something......<NO>1</NO>
something......<NO>5</NO>
something......<NO>1</NO>
something......<NO>1</NO>
something...... & so on.
Now instead of these numbers coming in this order i prefer to display in final output file as
1 2 3 4 5 .................... n
Is it possible in any ways using xslt.
DO we need to ignore the values given in input file and then generate output values for same.
it can be like the number of times NO tag appears in xml, it should start from 1 and keep increasing value by 1, until NO tag finishes appearance.
But next time when other xml transforms it again should be able to start from 1 till n.
is there a possibility of using java code for this situation or xslt is capaable enough to handle this.
Thanks
VJI'm guessing you are looking for something like this. I used a pull approach but it could be done with a push (xsl:for-each).
Sample XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<NO>1</NO>
<NO>1</NO>
<NO>2</NO>
<NO>1</NO>
<NO>3</NO>
<NO>1</NO>
<NO>5</NO>
<NO>1</NO>
<NO>1</NO>
</root>
Sample XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>
<xsl:template match="root">
<output>
<xsl:apply-templates select="NO"/>
</output>
</xsl:template>
<xsl:template match="NO">
<row>
<xsl:value-of select="position()"/>
</row>
</xsl:template>
</xsl:stylesheet>
Sample Output
<output>
<row>1</row>
<row>2</row>
<row>3</row>
<row>4</row>
<row>5</row>
<row>6</row>
<row>7</row>
<row>8</row>
<row>9</row>
</output>
Maybe you are looking for
-
CS 3 Bridge crashes / freezes when trying to run the slideshow feature
A while back I deactivated Photoshop CS3 that was installed on my laptop. Then this past week I went to reinstall it again. One thing I noticed was that the PS-CS3 and Bridge Icons were still residing on my desktop. I went into the "add/remove progra
-
Hi, We have a form in which we use the call web.show_document(l_url, '_blank'), where l_url is a location of an html file on a local pc. Then in a seperate browser the html file is shown.This works fine for our application. Now some users are migrate
-
Documents in BW....Can we link to R/3 Document ?
Hi All, For master data we can maintain documents in R/3 system... We also maintain documents in BW... Lets say for 'Material' we have a document available in R/3 already. We want the same document to be available from BW. So, now do we have to crea
-
Re: PHP and Oracle Connection
Are any specific links that will give me all knowledge regarding php and oracle connection? I am a new babie in this please help me out.
-
Unknown Error on upload - one solution
Hi, I found a solution to an unknown error on upload. If you link to a file with a hyperlink (rather than a web page) don't try to rename in the web page text. iWeb with automatically inserts the full file name whrn you choose the file in the Inspect