Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL query

Author  Topic 

krishnakumar
Starting Member

5 Posts

Posted - 2007-10-25 : 10:19:09
Dear Sir,

I am new to this forum. Am i posted any thing wrong please forgive me.

Last two days i am trying to write a query. I can not do that. I hope any one can help me to write this query

situation
I have two Columns

Order Amount
3007 25
3008 50
3009 25

If i am searching the Order with Amount column like 100
i need to get those three orders like this 3007,3008,3009

If the record is like this..

Order Amount
3007 60
3008 30
3009 90

Then It should search the orders like the following
60+30+10( It sholud adjust automatically to 100 from the third order amount)


My hairs are pulling out for the last two days

Any one can help me please I am beging you the query sir.

Thanks
krishnakumar

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-25 : 10:23:35
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=80857



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

krishnakumar
Starting Member

5 Posts

Posted - 2007-10-25 : 11:48:07
Thank you sir.

I got the nearest values. Let me try to find exact values

Thanks
krishnakumar
Go to Top of Page
   

- Advertisement -