INSERT INTO rhkprod_tblCartAdjustments ( tblPeopleFK ,cfUserID ,tblProductsFK ,adjusted ,originalQuantity ,adjustedQuantity ) SELECT NULLIF(@app_user_id, '') ,NULLIF(@cf_user_id, '') ,@tblProductsFK ,1 ,@cartQuantity ,@quantity WHERE COALESCE(NULLIF(@app_user_id, ''), NULLIF(@cf_user_id, '')) IS NOT NULL
I am getting: Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the varchar value '1506_18149772' to data type int. If I comment out the following: WHERE COALESCE(NULLIF(@app_user_id, ''), NULLIF(@cf_user_id, '')) IS NOT NULL It works. @app_user_id is an int, @cf_user_id is a varchar. Is there some sort of conversion going on? Can I cast or convert the @cf_user_id to an int somehow? I don't need the value, just need to know that it is not null. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:315190 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm
