Monday, March 26, 2012

query

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
On Wed, 19 May 2004 10:28:42 +0500, Noorali Issani wrote:

>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
>
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
(Remove _NO_ and _SPAM_ to get my e-mail address)

No comments:

Post a Comment