Created
December 2, 2019 09:50
-
-
Save davidsheardown/065163597fc605f4547ea6ab4a3228c6 to your computer and use it in GitHub Desktop.
Ability to use OPENQUERY to cross-server join from MS SQL to HANA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TOP (1)TX.[LIN_ItemNumber_PRI_02] as 'AmazonCode', TX.[SAP_ItemNumber] as 'ItemCode', | |
| TX.RFF_ReferenceNumber, | |
| TY.CardCode AS 'CardCode' | |
| FROM [MY_STAGING].[dbo].[MS-SQL-TABLE] TX | |
| inner join OPENQUERY ("hana-b1",'SELECT T0."AddID", T0."CardCode" from "A-SAP-HANA-DB"."OCRD" T0') TY on TX.RFF_ReferenceNumber = TY.AddID | |
| WHERE [SAP_ItemNumber] IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment