SQL Help! (1 Viewer)

grassaj

Registered User.
Local time
Today, 03:07
Joined
Feb 27, 2002
Messages
10
Hi Everyone,

I would like to write a SQL statement that does the following:

In tblData, if there is an empty or null value in the Sample column, change it to "Empty".

I'm afraid I am not very good with SQL statements, so any help would be greatly appreciated!

Maybe an UPDATE statement?
 

David R

I know a few things...
Local time
Yesterday, 21:07
Joined
Oct 23, 2001
Messages
2,633
If this is a one-time action, you can do it with the Update Query, in Design View even, unless it absolutely needs to be SQL.
Include tblData in your query, show only field [Sample]. Change Query type to Update Query, put "Empty" in the Update To: space, and change the criteria to Is Null

Run the query (red ! button).

You can view this query in SQL view to see what the SQL is for the action.

Alternatively, if this is just a display thing, you can actually make a field show "Empty" with Format: @;"Empty"
I can even make number fields look like this. I don't know where the documentation is for this though, I just saw it in a post here.

HTH,
David R
 

Users who are viewing this thread

Top Bottom