Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I scan my database for null values
Message
De
26/10/2001 11:04:54
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00573060
Message ID:
00573654
Vues:
17
Oooops sorry,

That'll teach me to cut and paste!!! ;)

It should read as I suspect you already know....

UPDATE [TableName] SET
[fieldname1] = CASE WHEN [fieldname1] IS NULL THEN 0 ELSE [fieldname1] END,
[fieldname2] = CASE WHEN [fieldname2] IS NULL THEN '' ELSE [fieldname2] END

Where fieldname1 is a numeric field and fieldname2 is a character field.

Regards

Ian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform