on 12-18-2006 3:45 PM
Hi everybody,
I know taht this is no dedidcated XI question.
But, does anybody the sql statement for selecting maximal (e.g. 20) rows?
Regards Mario
It depends from the database you are working with: for instance, with Oracle you have a specific syntax for the query:
select name from user where rownum < 10
you will get the first 10 entries only, thanks to the "rownum" embedded field.
Refere to here:
http://www.akadia.com/services/ora_important_part_3.html
Regards,
Sandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hay Mario,
As Sandro mentioned it all up to the DB youre using, in DB2 its :
SELECT *
FROM URI.TB_GIRLS
FETCH FIRST 10 ROWS ONLY ;
And in MySQL its :
SELECT *
FROM tb_girls
ORDER BY age
LIMIT 10
And I can go on all night but I guess you got it
Uri.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
u can use direct SQL Statement with
action= SQL_QUERY
Look to <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm">Document Formats for the Receiver JDBC Adapter</a>
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this.
SELECT TOP <n> column1, column2, dt FROM <table>
Thanks,
Tuhin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.