How does the data in that column look like?

----- Original Message -----
From: Eric Creese <[EMAIL PROTECTED]>
Date: Thursday, June 12, 2003 3:34 pm
Subject: SQL conversion question for SQL Guru

> 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

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to