Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set field = NULL

Status
Not open for further replies.

dbomrrsm

Programmer
Feb 20, 2004
1,709
GB
Hi All

I need to set a field to NULL in a table before I do an update - any ideas on a quick method as the below takes ages.

Update MyTable
Set MyField = NULL

Cheers

DBomrrsm
 
What do you mean by null?
0 or ""
Is it text or numeric

Hope this helps
Hymn
 
NULL as in if I did a

Count (*)
FROM MyTable
WHERE MyField IS NOT NULL

I would get zero
 
try an update query

Hope this helps
Hymn
 
Thats what I did try - but thanks for your help anyway
 
Yes! I will have to looking at what forum I'm connecting to, it looks as though something has wobbled on my machine

Hope this helps
Hymn
 
It sounds like you have the field indexed, which may be the cause of the slow response (multiple things happening per row updated).

A standard procedure is to remove indices, apply update, and re-impose indices.

hth

Mike
 
Mike

Your right - thanks for the tip which I should have known.

Cheers

DBomrrsm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top