NAA17005
Sender: [EMAIL PROTECTED]
Precedence: bulk
Reply-To: rbase-l

Okay, here's the contest.  Help me figure out the easiest way to
get this information.

I have a table of transactions with TranType column.  Every bond
(BondNo) should have an 'FR' TranType within a selected date range
if they had any activity during the month.  (This 'FR' transaction
is posted after all the activity for that month is closed for that
bond.)

What I need to do is trap for records where there has been activity
during the month (defined as anything other than 'NC') and there 
is no 'FR' yet.  Something like:
   select bondno from bondtrans where 
        repdate between 1/1/02 and 1/31/02
        and trantype <> 'nc' and
        < there is no 'fr' transaction during that period>

This gets me ALMOST there.

The biggest winner will be the one to take this one step further.
There can be MULTIPLE 'FR' transactions.  They could post all the
activity, generate this 'FR', then post more activity but forget
to do another 'FR'.  So what I really need to do is check for the
absence of an 'FR' following the LATEST trantype <> 'nc'

In the absence of a nifty SQL statement, I will set a cursor and
do it that way!

Oh, did I mention -- there's no prize.

Karen




================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to