« Return to Thread: sql

sql

by puppyoo :: Rate this Message:

Reply to Author | View in Thread

i need to write a basic SQL, taking user parameter (financial year) in the form of e.g. 2006/2007 and from that I need to extract the data for last year 2005/2006. the 2006/2007 comes from a column in the form or string varchar2. how can I get previous years from that entry

select year from year
where year = 'year - 1'

select year from year
where year = '2006/2007 - 1'
is this correct

 « Return to Thread: sql