You are here: Help with SQL Query ! « MsSQL Server « IT news, forums, messages
Help with SQL Query !

Posted by russzee on 12/07/05 04:48

I have a table with the following columns

---------------------------------------------
Payment Payment_Date
--------------------------------------------
900 5/15/05
900 615/05
900 7/15/05
900 8/15/05
900 9/15/05
-------------------------------------------

I also have a predetermined value @total = 3600

I need to write a SQL query where it returns the Payment_Date as soon
as SUM(Payment) > 3600.

So , in this case the returned result would be 9/15/05

I know I can do this via cursors but i was wondering if there is a sql
query which can accomplish this.


TIA
- Mr. Z

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация