RE: SQL Help.

RE: SQL Help.

 

  

I appreciate your response, but my data is stored in 3 tables as I
mentioned.
I just observed that data got wrapped after sending the mail. Re-orders
column is in Table C.

-----Original Message-----
From: Cameron Pam [mailto:pam.[Email address protected]
Sent: Thursday, November 18, 2004 12:34 PM
To: Mohan Kumar
Subject: RE: SQL Help.

**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email, **and removed
any attachments, and kept your email address secret **from this person,
and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal **Anything below this line is the original email text


This might work...

Select a.id,
a.name,
b.checks,
a.re-orders
From Table A a,
Table B b
Where a.id=b.id
Order by a.id


Pamela


-----Original Message-----
From: Mohan Kumar
[mailto:oracledba-ezmlmshield-x9966217.[Email address protected]
Sent: Thursday, November 18, 2004 11:20 AM
To: LazyDBA Discussion
Subject: SQL Help.

Hi All,

Can any one help in building a SQL query to get the below output;

ID Name Checks Re-Orders
------------------------------
1 AB 150 5
250 10
350
2 CD 200 20
15
3 EF 100 25
200 100
4 GH 300
5 IJ 50

My data is stored in 3 tables like this;

Table A Table B Table C

ID Name ID Checks ID Re-Orders
---------- ------------- ------------
1 AB 1 150 1 5
2 CD 1 250 1 10
3 EF 1 350 2 20
4 GH 2 200 2 15
5 IJ 3 100 3 25
3 200 3 100
4 300 5 50

Thanks in advanced.

Mohan.


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see
http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to
these terms:http://www.lazydba.com/legal.html



Oracle LazyDBA home page