Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select statement

Former Member
0 Likes
574

Hi,

How can i get the maximum number of one field using select statement...

Thanks&regards,

Praveen

please reply me

1 ACCEPTED SOLUTION
Read only

former_member313782
Active Participant
0 Likes
555

Hi Praveen,

use aggregate fn max

select max( field ) from.........

U can try like this,

MAX (field): The maximum value of the field

eg.

SELECT MAX (field) INTO (W_MAX)

FROM table <table name>

ENDSELECT.

Hope you have understood.

Kindly reward points if useful,

Regards,

Jose

5 REPLIES 5
Read only

Former Member
0 Likes
555

Hi,

Your question is not quiet clear, but to get the maximum of a field in a DB-table you can use SELECT MAX( <name of the field>).

Regards,

John

Read only

Former Member
0 Likes
555

Hi Praveen,

I didn't get u r question..cud u explain u r issue

clearly..

Regards

Ashok

Read only

0 Likes
555

Hi all,

Thanks for your replies. I got the output as required.

Regards,

Praveen

Edited by: Praveen kumar Mannepalli on Jan 10, 2008 8:01 PM

Read only

Former Member
0 Likes
555

USe the aggregate Function MAX().

Eg:

Select Max ( Field1 ) from Tablename Into Table itab

WHere <condition>

Group By Fields..

awrd points if useful

Bhupal

Read only

former_member313782
Active Participant
0 Likes
556

Hi Praveen,

use aggregate fn max

select max( field ) from.........

U can try like this,

MAX (field): The maximum value of the field

eg.

SELECT MAX (field) INTO (W_MAX)

FROM table <table name>

ENDSELECT.

Hope you have understood.

Kindly reward points if useful,

Regards,

Jose