stockton Posted July 17, 2010 Share Posted July 17, 2010 I believe that one can do something like INSERT ....... ON DUPLICATE UPDATE field = field in mssql Is this true and if so what is the correct format? Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/ Share on other sites More sharing options...
Mchl Posted July 17, 2010 Share Posted July 17, 2010 That's MySQL specific syntax. I believe it does not exist im MSSQL Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/#findComment-1087417 Share on other sites More sharing options...
stockton Posted July 17, 2010 Author Share Posted July 17, 2010 Thank you, no wonder I could not find it. Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/#findComment-1087418 Share on other sites More sharing options...
stockton Posted July 17, 2010 Author Share Posted July 17, 2010 Is there something similar one could use in MSSQL to achieve the same purpose? Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/#findComment-1087434 Share on other sites More sharing options...
corbin Posted July 17, 2010 Share Posted July 17, 2010 As Mchl said, UPDATE INTO (or the longer INSERT INTO ON DUPLICATE....) is MySQL specific, and as far as I know, nothing like it exists in MSSQL. You can either use two queries, or you can use a stored procedure. Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/#findComment-1087546 Share on other sites More sharing options...
stockton Posted July 18, 2010 Author Share Posted July 18, 2010 Thank you Link to comment https://forums.phpfreaks.com/topic/208024-update-on-duplicate-in-mssql/#findComment-1087669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.