× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In your view you want to create a date column. Then you can query against the date column.

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of jerry ven
Sent: Friday, July 1, 2022 8:26 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [EXTERNAL] records between two dates

I created view like this:-

create view LIB1/V1 AS ( SELECT * FROM LIB1/file1 where ((field1*
1000000) + ( field2*10000) + (field3*100) + field4) between '20210601'
and '20210607' )

Then view V1 in my library LIB1 was created for this SQL Query , now when i am trying to create a WRKQRY command and there after specifying this view
V1 under 'Specify file selections'
then under 'Select Records' How can I specify this where condition like which i have used in this SQL query ( where ((field1* 1000000) + (
field2*10000) + (field3*100) + field4) between '20210601' and
'20210607')



Thanks


On Fri, 1 Jul 2022 at 16:43, Rob Berendt <rob@xxxxxxxxx> wrote:

Also, if you go into Run SQL Scripts and pick Edit, Examples, Insert
from Examples, Data Definition Language (DDL), there is an example or
two on "Create or Replace View".

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
jerry ven
Sent: Friday, July 1, 2022 3:14 AM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: [EXTERNAL] records between two dates

CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.


Hi,

So if 'creating and using the view in WRKQRY ' is the only way to
prove that both SQL query and WRKQRY match in terms of the end result
data set then what are the steps which need to be followed to do so
specifically for this SQL Query ( ' SELECT * FROM LIB1/file1 where
((field1*
1000000) + ( field2*10000) + (field3*100) + field4) between '20210601'
and '20210607' ) when trying to build that equivalent WRKQRY ?


Thanks.

On Fri, 1 Jul 2022 at 02:15, Rob Berendt <rob@xxxxxxxxx> wrote:

Use the view in the wrkqry.
Or stop using WRKQRY as a prove.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf
Of jerry ven
Sent: Thursday, June 30, 2022 3:53 PM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx

Subject: Re: [EXTERNAL] records between two dates

CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.


But what if this needs to be proved using WRKQRY only that SQL query
matches with WRKQRY in terms of result then What would be the
structure
of
that WRKQRY?



Thanks

On Fri, 1 Jul 2022 at 01:18, Rob Berendt <rob@xxxxxxxxx> wrote:

CREATE VIEW and use that instead.
If you don't despise your users you can also change the names from
stupid
stuff like IMXRYR, IMACCT, IMITEM to stuff that makes sense for
them in
the
view also.

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept
1600 Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf
Of jerry ven
Sent: Thursday, June 30, 2022 3:00 PM
To: Midrange Systems Technical Discussion <
midrange-l@xxxxxxxxxxxxxxxxxx

Subject: Re: [EXTERNAL] records between two dates

CAUTION: This email originated from outside of the organization.
Do not click links or open attachments unless you recognize the
sender and
know
the content is safe.


If I need to verify the records are certain using this manner how
can I
cross verify it through WRKQRY:-

I mean, if my sql query is like this :- ' SELECT * FROM
LIB1/file1
where
((field1* 1000000) + ( field2*10000) + (field3*100) + field4)
between '20210601' and '20210607'

Then just to cross verify whether this SQL query shows the correct
record
set then what is the counter WRKQRY I could prepare to be sure
whether both SQL and WRKQRY show the same result set here?



Thanks.




On Thu, 30 Jun 2022 at 22:24, Roger Harman
<roger.harman@xxxxxxxxxxx>
wrote:

Or, write a UDF to do the conversion. Be sure to specify it as
"deterministic" to aid in performance.

For clarity, I much prefer UDF's over calcs like this.


Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on
Power


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On
Behalf
Of
Alan Shore via MIDRANGE-L
Sent: Thursday, June 30, 2022 9:27 AM
To: Midrange Systems Technical Discussion <
midrange-l@xxxxxxxxxxxxxxxxxx

Cc: Alan Shore <ashore@xxxxxxxx>
Subject: RE: [EXTERNAL] records between two dates

Combine the field together in the following manner ((CC *
1000000) + (YY * 10000) + (MM * 100) + DD)

Alan Shore
Solutions Architect
IT Supply Chain Execution

[NHScsignaturelogo]

60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx

'If you're going through hell, keep going.'
Winston Churchill

From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx]
On
Behalf
Of jerry ven
Sent: Thursday, June 30, 2022 12:01 PM
To: Midrange Systems Technical Discussion <
midrange-l@xxxxxxxxxxxxxxxxxx

Subject: [EXTERNAL] records between two dates

Hi,

How to filter records from a date field if it's split in CC YY
MM DD
(
Each field here with 2 length and decimal data type) using SQL
query
from
a file?

i mean date field is like in file1 like below:-

fld1 fld2 fld3
fld4
CC YY MM
DD


So from this type of split fields how can we filter records for
a
specific
week, month, year and century ,and records between specific
dates
using
SQL query on this file1 ?



Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&amp;data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&amp;reserved=0
<



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&amp;data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&amp;reserved=0

or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives at



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farch
ive.midrange.com%2Fmidrange-l&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&amp;reserved=0
<



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farch
ive.midrange.com%2Fmidrange-l&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&amp;reserved=0
.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:
support@xxxxxxxxxxxxxxxxxxxx> for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famaz
on.midrange.com%2F&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&amp;reserved=0
<



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famaz
on.midrange.com%2F&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&amp;reserved=0

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&amp;data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&amp;reserved=0
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farch
ive.midrange.com%2Fmidrange-l&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&amp;reserved=0
.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:



https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famaz
on.midrange.com%2F&amp;data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&amp;reserved=0
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

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-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.