Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Sep 2002 @ 18:05:47 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Improper column reference in the search condition of a
 
From:   Burton, Bruce

the problem only started happening when I added the "problem here" marked part below.

Thanks!

Bruce

SELECT
  pacMASTEROWN.MARKET.MRKT_CD,
  pacMASTEROWN.MARKET.MRKT_NM,count(*)
  agent.agt_channel,agent.agt_group,
  count(distinct pacMASTEROWN.CUSTOMER.BAN_ID) as ltmay
FROM
  pacMASTEROWN.MARKET,
  pacMASTEROWN.DEALER  Subscriber_Setup_Dealer

RIGHT JOIN pacMASTEROWN.SUBSCRIBERS ON

Subscriber_Setup_Dealer.DEALR_CD=pacMASTEROWN.SUBSCRIBERS.SBSCR_SETUP_DEALR_CD and
Subscriber_Setup_Dealer.MRKT_CD=pacMASTEROWN.SUBSCRIBERS.SBSCR_MRKT_CD

RIGHT JOIN pacMASTEROWN.CUSTOMER ON
pacMASTEROWN.CUSTOMER.CUST_MRKT_CD =
pacMASTEROWN.SUBSCRIBERS.SBSCR_MRKT_CD
AND pacMASTEROWN.CUSTOMER.CUST_SUB_MRKT_CD =
pacMASTEROWN.SUBSCRIBERS.CUST_SUB_MRKT_CD AND
pacMASTEROWN.CUSTOMER.SNPST_PRD_ID =
pacMASTEROWN.SUBSCRIBERS.SNPST_PRD_ID
AND pacMASTEROWN.CUSTOMER.BAN_ID = pacMASTEROWN.SUBSCRIBERS.BAN_ID,
pacMASTEROWN.DEALER_TYPE  Subscriber_DEALER_TYPE

problem here ---->left join mktg_temp.agent on
market_code=Subscriber_Setup_Dealer.MRKT_CD and
Subscriber_Setup_Dealer.DEALR_CD=agent_code

WHERE
  ( Subscriber_DEALER_TYPE.MRKT_CD=Subscriber_Setup_Dealer.MRKT_CD and
Subscriber_DEALER_TYPE.DEALR_TYPE_CD=Subscriber_Setup_Dealer.DEALR_TYPE_CD
)
  AND  (
  substr(pacMASTEROWN.SUBSCRIBERS.SNPST_PRD_ID,1,6)= '200209'
  AND  substr(pacMASTEROWN.CUSTOMER.SNPST_PRD_ID,1,6)='200209'
  AND  (pacMASTEROWN.SUBSCRIBERS.EMAIL_ADR  <> '    '
  OR   pacMASTEROWN.CUSTOMER.EMAIL_ADR  <> '     '  )
  and  SUBSCRIBERS.SBSCR_STUS_CD  IN  ('A', 'S')
  AND  pacMASTEROWN.SUBSCRIBERS.INITL_ACTVN_DT  <  '2002-05-08')
  group by
  pacMASTEROWN.MARKET.MRKT_CD,
  pacMASTEROWN.MARKET.MRKT_NM,
 agent.agt_channel,agent.agt_group


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023