How to delete a field value?

L

lvensen

Hi,

In my table i stored the date values. I want to delete the date
value based on some condition. I used delete command to delete the field
value but it deletes the entire row. I also used update command, it showing
conversion error. I want to delete the date value or replace it with empty
space. How it is possible? Thanks in advance.
 
B

Bernd Gilles

lvensen said:
Hi,

In my table i stored the date values. I want to delete the date
value based on some condition. I used delete command to delete the field
value but it deletes the entire row. I also used update command, it showing
conversion error. I want to delete the date value or replace it with empty
space. How it is possible? Thanks in advance.

UPDATE MyTable SET MyField=NULL WHERE MyCondition

or

UPDATE MyTable SET MyField='' WHERE MyCondition
 
J

John W. Vinson

Hi,

In my table i stored the date values. I want to delete the date
value based on some condition. I used delete command to delete the field
value but it deletes the entire row. I also used update command, it showing
conversion error. I want to delete the date value or replace it with empty
space. How it is possible? Thanks in advance.

A Date/Time field is NOT a string. It's stored as a number, a count of days
and fractions of a day since midnight, December 30, 1899. It can either be a
valid date between 1/1/100 and 12/31/9999, or it can be NULL; it cannot be a
string, even an empty string.

To blank out the date use an Update query and update the field to NULL.
 

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

Top