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? Quote 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 Quote 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. Quote 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? Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.