The field actually holds different kids of data based on the record type. I am only 
select records that will contain a date

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:44 PM
To: CF-Talk
Subject: Re: SQL conversion question for SQL Guru


Eric Creese wrote:
> 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.

Only a date, or other information as well?


> 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()

Which DBMS?

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

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

Reply via email to