Skip to content

Instantly share code, notes, and snippets.

@foontzoot
Created October 22, 2016 03:22
Show Gist options
  • Save foontzoot/dcd06e07dda9822e7a9bb1d781ddec59 to your computer and use it in GitHub Desktop.
Save foontzoot/dcd06e07dda9822e7a9bb1d781ddec59 to your computer and use it in GitHub Desktop.
INSERT INTO [TableName]
SELECT *
FROM OPENDATASOURCE
(
'SQLOLEDB','Data Source=XXX.XXX.XXX.XXX;User ID=USERNAME;Password=PASSWORD;'
).DATABASE_NAME.dbo.[TableName]
WHERE CouponId = @coupon_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment