Article View: borland.public.interbase.sql
Article #946actual(Date1) - next(Date2)
From: aleplgr
Date: Wed, 21 Mar 2007 23:01
Date: Wed, 21 Mar 2007 23:01
7 lines
1366 bytes
1366 bytes
asdfa I have one 3 field's table: ClientID, Date1 and Date2, first I need to order it by ClientID and for each ClientID order by Date1, then: I have to return a table with each CliendID and if the difference between the actual Date1 and next(Date2) >30 return actual Date1 else if there is no such difference >30 return the greatest Date1 for the actual ClientID. next(Date2) is the Date2 that is in the next row of the actual ClientID I can create auxiliar tables for storing intermmediate results and I'm using EMS SQL Manager 2005, but don't know how to deal with this, any hint please
Technical Details
Message-ID:
<4601ab4c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,dd90eb1b1157ce03,start X-Google-Attributes: gid114a0e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "aleplgr" <aleplgr@yahoo.es> Sender: "aleplgr" <aleplgr@yahoo.es> Reply-To: "aleplgr" <aleplgr@yahoo.es> Subject: actual(Date1) - next(Date2) Newsgroups: borland.public.interbase.sql X-User-Info: 147.83.129.209 NNTP-Posting-Host: 207.105.83.66 Message-ID: <4601ab4c$1@newsgroups.borland.com> Date: 21 Mar 2007 15:01:48 -0800 X-Trace: newsgroups.borland.com 1174514508 207.105.83.66 (21 Mar 2007 15:01:48 -0800) Lines: 8 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail