Sep 23, 2002 #1 pwills Technical User Sep 14, 2002 54 GB Newbie question; what is wrong with SELECT COMPANY FROM COMPANIES WHERE DATEDIFF ('m',INVOICED_ON,GETDATE()) = 1 I want to list all COMPANIES invoiced any time last month
Newbie question; what is wrong with SELECT COMPANY FROM COMPANIES WHERE DATEDIFF ('m',INVOICED_ON,GETDATE()) = 1 I want to list all COMPANIES invoiced any time last month
Sep 23, 2002 #2 osjohnm Technical User Apr 4, 2002 473 ZA Hi Try this: SELECT COMPANY FROM COMPANIES WHERE DATEDIFF (m, INVOICED_ON, GETDATE()) = 1 There is no need to have the month in quotes 'm'. John Upvote 0 Downvote
Hi Try this: SELECT COMPANY FROM COMPANIES WHERE DATEDIFF (m, INVOICED_ON, GETDATE()) = 1 There is no need to have the month in quotes 'm'. John