Hi all..
I am having a table FTP_FILE_SEQUEN CE_STATUS with fields
There are three filetypes a,b and c.
Now i want to get the status of the file type 'a' which is having the highest file sequence number. I am using the following query and its working :-)
But i have been asked to remove the double check for file_type. :-(
Any other way to get the status without checking for file_type twice ??
Any help would be highly useful ..
Many Thanks in advance..
I am having a table FTP_FILE_SEQUEN CE_STATUS with fields
Code:
FILE_TYPE ----- varchar2(10) FILE_SEQUENCE_NO ------- Number(7) GENERATION_DATE ------ Date STATUS -------- varchar2(1)
Now i want to get the status of the file type 'a' which is having the highest file sequence number. I am using the following query and its working :-)
Code:
select status from FTP_FILE_SEQUENCE_STATUS where FILE_TYPE='a' and FILE_SEQUENCE_NO = (select max(FILE_SEQUENCE_NO) from FTP_FILE_SEQUENCE_STATUS where file_type='a')
Any other way to get the status without checking for file_type twice ??
Any help would be highly useful ..
Many Thanks in advance..
Comment