on 05-15-2009 8:00 AM
Hello all ,
I had field in ztable name is doc_id.
and it has the data like
Doc_id
121
122
123
124
125
122
like this .i want to pic the largest number in that fields .
Could u please help in this .
thanking you,
urs,
suman
Hi Suman,
Use the below code.
SELECT * From ztable INTO gt_table.
SORT gt_table doc_no descending.
READ gt_table index 1.
You ll have the larggest no. now in gt_table-doc_no.
Br/Manas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use simple select statement:
SELECT MAX( your_field_in_z_table ) FROM ztabel INTO your_variable.
Attention: no space between MAX and bracket but spaces between bracket and fieldname.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.