Does this work for ya?

SELECT MAX(ID)
FROM XYZ
WHERE (ID < #PullInfo.XYZ_ID#) AND (XYZ_SENT = 1)

Dave

--

David M. Delbridge
Circa 3000
ColdFusion Hosting
http://www.circa3k.com
775-832-2445

"[EMAIL PROTECTED] [EMAIL PROTECTED]" wrote:
>
> Hi,
>
> I'm running a query with a specific row ID.  From there, I'm trying to
> extract a
> previous row's information where the row meets a bit value of
> 1.  Example, (SQL
> logic written out, pseudo)
>
> queryname=pull_info
> Query all entries
> from xyz table
> where xyz_id = value passed from form
>
> Once this row has been identified, I now need to get the xyz_id of the
> row
> before it that meets a certain criteria.
>
> (SQL logic written out, pseudo) Here's where I'm stuck
> query all entries
> from xyz table
> ???
> look before pull_info.xyz_id AND where xyz_sent = 1
>
> Does this make sense?
>
> Thanks,
>
> D
>   
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to