Try the following
SELECT * FROM FILE
WHERE '20'|| DIGITS(YEAR)||DIGITS(MONTH)||DIGITS(DAY) BETWEEN
(DIGITS(FROMDCCYY) || DIGITS(FROMDMONTH)||DIGITS(FROMDDAY)) AND
(DIGITS(THRUDCCYY) || DIGITS(THRUDMONTH)||DIGITS(THRUDDAY))
where DCCYY, DMONTH, DDAY are the components of the FROM & THRU dates of
the display



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill

midrange-l-bounces@xxxxxxxxxxxx wrote on 08/21/2007 10:35:28 AM:

Hi every one,

My client has an urgent requirement he needs a sample report.

I have a physical file with 4 fields 1) YEAR 2) MONTH 3) DAY 4) NAME
With length of 2.

He wants to generate a report based on selection criteria.

For example: In display file I have 2 fields.

From date: 08/01/2007

To date : 08/21/2007

He wants to know the NAME which fall under these days

I used SQLRPG to retrieve the data but I failed to do.

Can any one please send the code or give guidance.


Thanks in Advance.

Best Regards,
Srinivas












----------------------------------------------------------------
DISCLAIMER---------------------------------------------------------
Information transmitted by this EMAIL is proprietary to iGATE Group
of Companies and is intended for use only by the individual
or entity to whom it is addressed and may contain information that
is privileged, confidential, or exempt from disclosure under
applicable law. If you are not the intended recipient of this EMAIL
immediately notify the sender at iGATE or mailadmin@xxxxxxxxx
and delete this EMAIL including any attachments


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.