SQL Server and Nulls
In an update query, to a tinyint field which allows nulls, I have the update dbfield=#mydatefield# If mydatefield has no value, sql is throwing an error. The field allows nulls. I've never had to say if then NULL before. What the heck? Robert Harrison Full Stack Developer AIMG rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 www.aimg.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360469 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: SQL Server and Nulls
dbfield = cfqueryparam cfsqltype=cf_sql_tinyint value=#mydatefield# null=#yesnoformat(mydatefield is '')# On Fri, Apr 17, 2015 at 3:58 PM, Robert Harrison rharri...@aimg.com wrote: In an update query, to a tinyint field which allows nulls, I have the update dbfield=#mydatefield# If mydatefield has no value, sql is throwing an error. The field allows nulls. I've never had to say if then NULL before. What the heck? Robert Harrison Full Stack Developer AIMG rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 www.aimg.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360471 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: SQL Server and Nulls
Dbfield=cfqueryparam value=#mydatefield# cfsqltype=CF_SQL_TINYINT null=#not len(mydatefield)# / Steve -Original Message- From: Robert Harrison [mailto:rharri...@aimg.com] Sent: Friday, April 17, 2015 3:58 PM To: cf-talk Subject: SQL Server and Nulls In an update query, to a tinyint field which allows nulls, I have the update dbfield=#mydatefield# If mydatefield has no value, sql is throwing an error. The field allows nulls. I've never had to say if then NULL before. What the heck? Robert Harrison Full Stack Developer AIMG rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 www.aimg.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360470 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm