SQL statement
Posted in 2009
Just a comment. You should compare dates to date fields not strings. IDS
will convert it for you but at a cost. This may also be causing it to use
more temp dbspace and have difficulty with indexing. Change this to:
select * from history
where h_date between date('01/28/2009') and date('02/26/2009')
and h_type = 'BILLED'
order by h_date
-----
Thanks to those who have picked this typo up, the second where should be an
and
The queries should be...
SELECT * FROM history
where h_date between '01/28/2009' and '02/26/2009'
and h_type = 'BILLED'
order by h_date
This does not, brings back NO RECORDS FOUND...
SELECT * FROM history
where h_date between '01/28/2009' and '02/26/2009'
and h_type = 'BILLED'
order by h_date Desc
*****************************************************************************
**
Forum Note: Use "Reply" to post a response in the discussion forum.
Thanks!
Kate Tomchik [ kate@iiug.org ] www.iiug.org
International Informix Users Group Board of Directors
A computer lets you make more mistakes faster than any invention in human
history - with the possible exceptions of handguns and tequila.
Mitch Ratliffe