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 Quote 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? Quote 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 [] Quote Link to comment https://forums.phpfreaks.com/topic/202054-replace-null/#findComment-1060316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.