467,149 Members | 1,274 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,149 developers. It's quick & easy.

insert null into datetime field

100+
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
  • viewed: 10319
Share:
2 Replies
code green
Expert 1GB
Insert an empty value
Expand|Select|Wrap|Line Numbers
  1. field = ''
Oct 31 '08 #2
ck9663
Expert 2GB
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.

Similar topics

2 posts views Thread by Phil Powell | last post: by
reply views Thread by M. Bader | last post: by
8 posts views Thread by Manish Jain | last post: by
6 posts views Thread by FatboyCanteen | last post: by
1 post views Thread by Mike the Canadian | last post: by
2 posts views Thread by gradeA | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.