That is the proper way :)

If your shpdtiso is a true DATE field, you may want to explicitly cast the
literal to DATE('2006-03-13').  You don't have to, but every piece of
information you give to the query optimizer helps it make better decisions.

Elvis

-----Original Message-----
Subject: SQL file output (newbie)

CREATE TABLE qtemp/ordtlhst AS (Select * FROM dbmstf/ordtlhst WHERE onrcu IN
(SELECT onrcu FROM dbmstf/orhdrhst WHERE shpdtiso >= '2006-03-13' AND
shpdtiso <= '2006-03-17')) WITH DATA

That worked!  Id this the 'proper' SQL statement to do this?  I'm ultimately
going to be passing the dates in as parms.

Thanks!


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.