dbTalk Databases Forums  

Re: SQL query

comp.databases.sybase comp.databases.sybase


Discuss Re: SQL query in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nnnnnn
 
Posts: n/a

Default Re: SQL query - 07-04-2003 , 03:28 PM






search google for "characteristic functions"

"AK" <ak.fuan (AT) uk (DOT) mizuho-sc.com> wrote

Quote:
I have got a table which contains the following column and data.

DateField Amount
01/01/03 5
02/01/03 10
03/01/03 10
04/01/03 10
05/01/03 13
06/01/03 5
07/01/03 5
08/01/03 30
09/01/03 10
10/01/03 10
11/01/03 30

How do I retrieve the following values without the use of cursor or
doing row based processing.

DateField Amount
01/01/03 5
04/01/03 10 (the max date for this value before it changes to
13.)
05/01/03 13
07/01/03 5 (the max date for this value before it changes to
13.)
08/01/03 30
10/01/03 10 (the max date for this value before it changes to
13.)
11/01/03 30


Regards
AK



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.