Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

update query for existing records based on criteria Expand / Collapse
Author
Message
Posted Monday, February 04, 2013 12:58 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, March 13, 2014 2:33 PM
Points: 117, Visits: 315
I'm needing to write a query that updates about 700 records that have "Null" and write the phrase "Individual Purchase if it finds this.... I'm rusty with ad hoc update queries... thought below would work, but not:

USE TrackIT
UPDATE dbo.tblTransactions
SET tblTransactions.Transaction_Type = 'Individual Purchase'
WHERE tblTransactions.Transaction_Type = Null
GO
Post #1415466
Posted Monday, February 04, 2013 1:17 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, April 14, 2014 3:54 PM
Points: 727, Visits: 425
i believe what you want isn't = Null but IS NULL

Post #1415474
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse