If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Outer join issue in teradata

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-09, 15:26
KETAN4U KETAN4U is offline
Registered User
 
Join Date: Dec 2009
Posts: 7
Outer join issue in teradata

HERE IS MY CODE

SELECT
A,
B,
C,
D,
E

FROM
(
SELECT
A,
B,
C
FROM VW1
GROUP BY A) Query1,

(SELECT
A,
D,
E FROM VW1
where week= (SELECT WEEK FROM CALNEDAR WHERE CALENDAR_DATE =( CURRENTDATE()-7))
GROUP BY A) QUERY2

WHERE
QUERY1.A= QUERY2.A

Now all rows are not being returned because the second query is briging back only records from last week.
I need an outer join and I am not able to place an outer join in the where clause
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On