SQLTeam.com | Weblogs | Forums

Query help

i have set the below query which works fine for me. However i want to limit the data to show me only data where column idt left 4 char is greater then 2000

SELECT * FROM [ireport]

can i write this as SELECT * FROM [ireport] where left(idt,4)>2000

if left(idt,4) is all numbers and idt is varchar field then

SELECT * FROM [ireport] where cast( left(idt,4) as int ) > 2000