set date field to null

  • Thread starter Thread starter recif20002002
  • Start date Start date
R

recif20002002

I read a lot for messages but i still can manage to get it working

I basically writing an update query which set the Date field as null
(empty cell).

I tried
UPDATE table
SET Name = parameter, Date = Null
WHERE .... ;

but it doesn t work. I tried all the possible combinations using # ' "
but it still doesn t cut it
 
yes it is through a query

<cfquery name="delete" datasource="database1">
UPDATE table
SET Name = '', Date = Null
WHERE Name='#userName#';
</cfquery>

It is not like the user was inputing the date or anything i just want
to change the date to null when that query is runned

thx a lot
 
Please post the full SQL. However, if the names you have here are the
correct names, start by enclosing them in brackets, you have used reserved
words for field names.

Example:
UPDATE table
SET [Name] = parameter, [Date] = Null
WHERE .... ;

I just tried the following and it set the date field to Null:

UPDATE Table1 SET Table1.DateField= Null;
 
listen thx a lot for your help
actually i made the dumbess error, the check was made on a mispelled
column name... lol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top