on 05-03-2006 11:34 PM
Hi,
I am executing this SQL_Query,
"select * from salary_update where emp_no like ?".
Here I want to get the row count, how can I achieve this?
I appreciate your help.
Thanks,
Sunita.
Hi,
have a look at this weblog:
/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
to see how to create any jdbc response
without knowing it's format before the test:)
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
I know this approach.
But in the response from the DB, for the above select statement, there is not any row count field available. It is sending only the fields which will be mapped to the internal table (483) rows.
How can I send the row count also to the Response to the select statement?>
Thanks,
Sunita.
Hi,
you can only use count for delete,insert and update
if you want to do it with select
you can count it youself (since you have all the rows) you can do it with a simple User defined function
or count all rows removing the context - this should
be possible without any java code and only with standard
message mapping function
Regards,
michal
Hi,
try the count function:
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
and removeContexts on the row (the one with multiple occurance ) TAG
if this doesn't work create a simple function
which will count the rows
Regards,
michal
Hi Sunita,
Please go thru following blog -
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
http://help.sap.com/saphelp_nw2004s/helpdata/en/9d/308c4024d26e1de10000000a1550b0/frameset.htm
Standard Functions-
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/2d8c4024d26e1de10000000a1550b0/frameset.htm
Hope this helps,
Regards,
Moorthy
Hi sunita ,
u can use the Count function to determine the number of rows those are being read from the database using select statement .
Regards,
keith.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunita,
If you want to get the count in the select SQL statement you can do the following:
select column1, column2, column3, (select count(*) from table1) as rowcount from table1
It's not very efficient for the DB though, so it's better to just count the number of rows in the message map as was suggested earlier.
Thanks,
Jesse
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.