I am trying to create a new table within my SQL SVR database [Medicaid_Retro] called [UNM_Claims_REFERRAL_1] based on SQL SVR table [UNM_Claims_REFERRAL] and joining to Oracle via linked server NMPSEDW. Using the code below, I get the following error: "Invalid object name 'Medicaid_Retro.dbo.UNM_Claims_REFERRAL_1"
What is the proper syntax??
INSERT INTO [Medicaid_Retro].[dbo].[UNM_Claims_REFERRAL_1]
SELECT * FROM [Medicaid_Retro].[dbo].[UNM_Claims_REFERRAL] A,
(SELECT * FROM OPENQUERY(NMPSEDW,'SELECT CLM_SRVC_SRC_MBR_ID,
PROV_TAX_ID,CLM_SRVC_UMREF_ID,CLM_SRVC_PROC_CD,CLM_AUD_NBR,
CLM_AUD_LN_NBR
FROM PSDW.TB_PS_FCET_CLM_SRVC')) B
WHERE A.[Claim ID]=B.CLM_AUD_NBR
AND A.[Line_NO]=B.CLM_AUD_LN_NBR
What is the proper syntax??
INSERT INTO [Medicaid_Retro].[dbo].[UNM_Claims_REFERRAL_1]
SELECT * FROM [Medicaid_Retro].[dbo].[UNM_Claims_REFERRAL] A,
(SELECT * FROM OPENQUERY(NMPSEDW,'SELECT CLM_SRVC_SRC_MBR_ID,
PROV_TAX_ID,CLM_SRVC_UMREF_ID,CLM_SRVC_PROC_CD,CLM_AUD_NBR,
CLM_AUD_LN_NBR
FROM PSDW.TB_PS_FCET_CLM_SRVC')) B
WHERE A.[Claim ID]=B.CLM_AUD_NBR
AND A.[Line_NO]=B.CLM_AUD_LN_NBR