IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[NOSALE1YR]') AND type in (N'U')) DROP TABLE [dbo].[NOSALE1YR] GO SELECT * --INTO NOSALE1YR FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;HDR=YES;Database=\\AMCHAR_GP1\NotSold\NOSALE1YR.xlsx', 'SELECT * FROM [CODE$]'); INSERT INTO SSGPR100 (SSGPROMO, ITEMNMBR, CUSTNMBR, STRTDATE, ENDDATE, SSG_Customer_Price, MRKDNAMT, PRICELVL, UOFM) SELECT n.SSGPROMO, n.ITEMNMBR, n.CUSTNMBR, n.STRTDATE, n.ENDDATE, n.SSG_Customer_Price, n.MRKDNAMT, n.PRICELVL, n.UOFM FROM NOSALE1YR n left join SSGPR100 s ON n.SSGPROMO = s.SSGPROMO WHERE s.SSGPROMO IS NULL
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.