You need to set the null attribute to yes, if the value is null
<cfqueryparam value="qGetData.PMEDICDATE" cfsqltype="CF_SQL_TIMESTAMP"
null="yes"> 

Or

INSERT INTO tblFeed(
 PMEDICDATE
) VALUES (
 NULL
)

PS. Use DTS to import files!


-- 
Taco Fleur
Senior Web Systems Engineer
http://www.webassociates.com


-----Original Message-----
From: Brant Winter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 23 November 2004 9:57 AM
To: CF-Talk
Subject: inserting empty dates into MSSQL

hi - I have now spent 1 whole day trying to import a whole stack of CSV data
into a MSSQL table. My insert query keeps falling over when it hits an empty
date field.

The MSDE table has a datetime field to enter this particular date into, but
some of my CSV fields have empty dates, and will continue to have empty
dates from time to time.

I have tried:

INSERT INTO tblFeed(
 PMEDICDATE
) VALUES (
 #CreateODBCDateTime(qGetData.PMEDICDATE)#
)

and:

INSERT INTO tblFeed(
 PMEDICDATE
) VALUES (
 <cfqueryparam cfsqltype="cf_sql_timestamp" value="qGetData.PMEDICDATE">
)

I just cant get anything to work, I can import data until it hits a row with
an empty date field.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185099
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to