By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,514 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,514 IT Pros & Developers. It's quick & easy.

Need help on Joins..

P: 2
Hi,

I have two tables as below:
Table T1.
CustName
Data_src
Timestamp
Amt

Table T2.
Custname
DataSrc
timestamp
adj_amt.

Now I have to find
1.distinct custNames from T1
2.get the timestamp field for the rows found at step1.
3.get the adj_amt from T2 to each timestamp found at step2.
4. Display T1,T2 values using a single query.

Please help one this
thanks,
Deven
Oct 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: 1
Hi,

I think below query works.

select A.CustName,
A.Timestamp,
timestamp,

from T2,
(select distinct CustName ,timestamp from T1 ) as A

where timestamp = a.timestamp;
Oct 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.