By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,767 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,767 IT Pros & Developers. It's quick & easy.

insert null into datetime field

100+
P: 219
I have this query that I'm using in coldfusion:

Insert into ps_manager_employee_ids (manager_emplid,emp_id,last_name,first_name,hire_d t,rehire_dt,emp_status,union_status)
values ('#manageremplid#','#emplid#','#last_name#','#firs t_name#','#hire_dt#','#rehire_dt#','#emp_status#', '#union_status#')

I'm trying to insert some date values, but they are entering as 1/1/1900 instead of NULL. How can I insert them as null instead?
Oct 31 '08 #1
Share this Question
Share on Google+
2 Replies


code green
Expert 100+
P: 1,726
Insert an empty value
Expand|Select|Wrap|Line Numbers
  1. field = ''
Oct 31 '08 #2

ck9663
Expert 2.5K+
P: 2,878
try this:


Expand|Select|Wrap|Line Numbers
  1. Insert into ps_manager_employee_ids (manager_emplid,emp_id,last_name,first_name,hire_d t,rehire_dt,emp_status,union_status)
  2. values ('#manageremplid#','#emplid#','#last_name#','#firs t_name#',NULL,NULL,'#emp_status#', '#union_status#')
Happy Coding!

-- CK
Oct 31 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.