Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8927

maximum value from table field.

$
0
0

hi all,

 

 

I wrote below code to select the maximum value of field cust_id from table ZPND_CUST_TAB,

but its not working as i required its giving last entry of the table.

 

can any one tell me what should i change in below code to get maximum value from cust_id field of  ZPND_CUST_TAB table.

 

 

 

 

DATA temp_cust_id TYPE ZPND_CUST_TAB-CUST_ID.

 

 

SELECT MAX( CUST_ID FROM  ZPND_CUST_TAB

                        INTO temp_cust_id

                        WHERE CUST_ID > 0.

 

 

   WRITE  temp_cust_id.


Viewing all articles
Browse latest Browse all 8927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>