dflow Posted May 17, 2010 Share Posted May 17, 2010 this is not working for me update products set [RegionID] = 0 where [RegionID] is null Link to comment https://forums.phpfreaks.com/topic/202054-replace-null/ Share on other sites More sharing options...
corbin Posted May 17, 2010 Share Posted May 17, 2010 That appears to be SQL Server style syntax. Try: UPDATE products SET RegionID = 0 WHERE RegionID IS NULL; The quote identifier (because I can't remember what it's really called) is ` in MySQL. It's [] in MSSQL. Also, what error are you getting? Link to comment https://forums.phpfreaks.com/topic/202054-replace-null/#findComment-1059675 Share on other sites More sharing options...
dflow Posted May 18, 2010 Author Share Posted May 18, 2010 That appears to be SQL Server style syntax. Try: UPDATE products SET RegionID = 0 WHERE RegionID IS NULL; The quote identifier (because I can't remember what it's really called) is ` in MySQL. It's [] in MSSQL. Also, what error are you getting? thanks it was indeed the [] Link to comment https://forums.phpfreaks.com/topic/202054-replace-null/#findComment-1060316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.