Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Date filtering

Author  Topic 

kalyformin
Starting Member

15 Posts

Posted - 2009-09-02 : 15:22:30
I have a table with a column datatype of varchar but it has date values. The data looks like this

Renewal_Date
1101
0401
0901
0101
0801
1101
1001
0101


The above data is in MMDD format with no year. Assuming all data is within the same year (2009) how do I filter this column to something like 'filter dates earlier than 0801 ?

Thanks for all the help!

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-09-02 : 15:27:04
[code]SELECT *
FROM MyTable
WHERE Renewal_Date < '0801'[/code]
Go to Top of Page
   

- Advertisement -