Need Help with where clause
Posted in 1997
Hi all,
I'm having a bit of a problem structuring a where clause to be able to use
a specific index. The index is a compound index made up of 3 columns.
(status,date_time desc,id_num). The application starts out with the status
="APA" and current date. The APA status is about the middle of the table in
this index order. I have no problems as long as I increase the status but
if I want previous to this status I start out at the top (status=" ")
but what I wanted was status="ANW". My select statement looks like this:
select status,date_time,id_num from tablename where status<="APA" andstatus||date_time||id_num<=Mvar order by status,date_time desc,id_num
Mvar is equal to the status+date_time+id_num of the current row.
I know this is probley something easy that I'm overlooking so I thought
I would give you all the chance to open my eyes. Thanks.
---
,-, |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| =======
___|| | | -----
//_ || | CANNON EXPRESS | ----
,-----'| ~ | | | --
|o-----|__ |--`======_______________________________======___| ~~~~~~~~
`-(*)--===~~~~~~(*)(*)| (*)(*)| -------
-------------------------------------------------------------------------
Joseph Cullipher |E-mail: joseph@cannonexpress.com
PO Box 364 |opinions express are those of my own and
Springdale, AR 72764 USA |don't necessarily reflect those of my company
-------------------------------------------------------------------------