I have a query I am trying to run to get a particular record out of the database. The problem is that one of the fields is a varchar 255 field that houses a date. I want to convert the date so I can find out if it is greater than getdate(). I run the following code and generate this conversion error message:
Server: Msg 241, Level 16, State 1, Line 1 Syntax error converting datetime from character string. select distinct personid from persondemographic where demographicgroupid =4 and demographicitemid =4 and convert(datetime, demographicvaluedesc) > getdate() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4