Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using LIKE With Date String 1

Status
Not open for further replies.

tekdudedude

Technical User
Sep 29, 2007
79
0
0
Hello,

How can I extend the below SQL so as it will return all string matches for 20080513 and greater. Greater in this case would mean values like: myfile_20080514.bus, myfile_20080515.bus etc.

Code:
SELECT fname FROM V$BACKUP_FILES WHERE fname LIKE '%20080513%.BUS';

Thanks,

TD
 
You may try this:
Code:
SELECT fname
FROM V$BACKUP_FILES
WHERE fname LIKE '%200_____.BUS'
AND SUBSTRING(fname FROM POSITION('.BUS' IN fname)-8 FOR 8)>='20080513'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top