February 18, 2019 at 3:43 pm
After I run this code and then run Select * from #TEMPSTP, i only get one Column.
It worked at one point, but i'd rather not back up to that point.
Thoughts? thanks use GTM_ODS;
-- drop table #Tempstp
-- Select * from #Tempstp
select * into #tempSTP from
(Select
  P.PROD_ID
     ,D.SUPPLIER_ID
  , P.DESCRIPTION
  , P.ELIGIBILITY_FLG
  , P.CTRY_ORIGIN
  , P.RESPONSE_HS
  , P.COMPRESSED_PROD_ID
  , D.SOLICITATION_ID
  , D.SOLICITATION_TYPE
  , D.TRADE_PROGRAM
  , D.BLANKET_FROM_DATE
  , D.DOC_ID
  , D.CREATED_BY
  , D.CREATED_DATE
  , D.SOLICITED_YN
  , D.LAST_MODIFIED_DATE
  , D.STATUS as Doc_Status
  , D.REMINDER_SENT_DATE
  , D.RESPONSE_RECEIPT_DATE
  , D.AUDIT_PASS_YN
  , D.CLOSE_DATE
  , D.HS_MISMATCH
  , D.REQUEST_TYPE
     ,' ' as ZATS
from
 [SOLICIT].[gtm_doc_Prod] P
 inner join
 [SOLICIT].[gtm_doc] D
on 
 D.[SOLICITATION_ID] = P.[SOLICITATION_ID]
  and D.[SUB_ORG] = P.[SUB_ORG]
  and D.[SOLICITATION_TYPE] = P.[SOLICITATION_TYPE]
WHERE
  Datepart(year,d.BLANKET_FROM_DATE) = '2019'
  and D.SUB_ORG = 'XXXX'
  and D.SOLICITATION_TYPE = 'Response'
  and D.STATUS = 'CLOSED'
  and TRADE_PROGRAM like '%nafta%'
     and P.CTRY_ORIGIN in ('CA', 'MX')
     )
     as STP
February 18, 2019 at 4:00 pm
SOLVED, thanks
February 18, 2019 at 4:22 pm
jeffshelix - Monday, February 18, 2019 4:00 PMSOLVED, thanks
So what was the problem?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply