I know exactly what you mean, Gunnar my friend, and that is absolutely the
best sort of logic there is!

"It must be right because it's almost the same way I do it"

Be careful, though, because equally, "It must be wrong because it's nowhere
near the way I do it" ought to be just as valid! <g>

Regards,
Alastair.



----- Original Message ----- 
From: "Gunnar Ekblad" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 5:02 PM
Subject: [RBASE-L] - RE: Quaterly Review


Listen to Albert!
If I ever saw a clever answer on a good question, this is the one!
I know it's clever since it very close to my own solution to the same
problem
It works!

Gunnar Ekblad



-----Ursprungligt meddelande-----
Fr�n: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] F�r Albert Berry
Skickat: den 17 oktober 2003 17:51
Till: RBASE-L Mailing List
�mne: [RBASE-L] - RE: Quaterly Review

There is no such thing as a stupid question, but you can get a plethora of
stupid answers. This might be one of them <G>

Create a table with quarters, first and last dates, and populate it
CREATE TABLE Quarters (Quarter INT NOT NULL PRIM KEY, +
QStart DATE NOT NULL UNIQUE,+
Qend DATE NOT NULL UNIQUE)

   20031, 01/01/2003,03/31/2003
   20032, 04/01/2003,06/30/2003
     etc.
   This table assumes that you need to identify 4th Qtr 2003 requiring
entries in 1st Qtr 2004. Now you can look things up by linking dates by the
quarter limits in the Quarters table.
  You could get fancy and create a view that gives you the quarters, but why
bother.




"Plateautel.net" <[EMAIL PROTECTED]> wrote:

>Can anyone help? Stupid question, huh? Please help!
>
>Working in a mental health facility, the clinicians are required to perform
quarterly reviews on clients.
>I have a table that contains
>
>Client_ID Integer
>Unit Integer
>Svc_Code text
>Svc_date date
>Server_ID Integer
>
>A Svc_code of 122 is a quartely update
>A svc_code of 150 is an ASI
>
>I need to find out two things
>
>If the client had any services, regardless of the unit, in the 2nd qtr,
then a svc_code of 122 must be performed in the third qtr.
>I need the client_id and Server_id for any clients that have any services
in the second qtr, but do not have a Svc_code of 122 in the third qtr.
>
>Also,
>If the client is assigned to unit 102 and has had any services in the 2nd
qtr then a svc_code of 150 must be performed in the third qtr.
>I need the client_id and Server_id for any clients that are assigned to
unit 102 and has services in the second qtr, but does not have a Svc_code of
150 in the third qtr.
>
>Please
>
>
>


-- 
Albert Berry
Full Time Consultant to
PSD Solutions
350 West Hubbard, Suite 210
Chicago, IL 60610
312-828-9253 Ext. 32


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial
today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Reply via email to