Groups | Blog | Home
all groups > sql server clients > may 2004 >

sql server clients : query


Noorali Issani
5/19/2004 10:28:42 AM
There are two tables

Expense Table
Amount date
5000 01/01/2004
5000 01/01/2004
100 01/01/2004

Sal Table
Amount date
10000 01/01/2004
400 01/01/2004
500 01/01/2004
100 01/01/2004



expense amount sale amount
5000 10000
5000 400
100 500
100

I want the data like this against 01/01/2004 date, can any body give me
query that how I fulfill that one.

Thanks
NOOR

Hugo Kornelis
5/19/2004 11:56:07 PM
[quoted text, click to view]

Hi Noor,

On what criteria should SQL Server base its decision to put the sale
amount of 400 before the sale amount of 500? Or the expense amount of 100
after both expense amounts of 5000?

Do the expense amount of 100 and the sale amount of 500 appear on the same
line for no specific reason at all, or is there some relation between
these two? If so, what is that relation and how can it be concluded from
data in your tables?

Finally, please post the DDL of your tables, including primary key and
foreign key definitions, as well as other relevant constraints.

Best, Hugo
--

AddThis Social Bookmark Button