|
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.of
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
that WRKQRY?midrange-l@xxxxxxxxxxxxxxxxxx
Thanks
On Fri, 1 Jul 2022 at 01:18, Rob Berendt <rob@xxxxxxxxx> wrote:
CREATE VIEW and use that instead.stupid
If you don't despise your users you can also change the names from
stuff like IMXRYR, IMACCT, IMITEM to stuff that makes sense forthe
them in
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 <
know
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
can Ithe content is safe.
If I need to verify the records are certain using this manner how
recordcross verify it through WRKQRY:-where
I mean, if my sql query is like this :- ' SELECT * FROM
LIB1/file1
((field1* 1000000) + ( field2*10000) + (field3*100) + field4)
between '20210601' and '20210607'
Then just to cross verify whether this SQL query shows the correct
Ofset 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
(midrange-l@xxxxxxxxxxxxxxxxxxAlan Shore via MIDRANGE-L
Sent: Thursday, June 30, 2022 9:27 AM
To: Midrange Systems Technical Discussion <
midrange-l@xxxxxxxxxxxxxxxxxxBehalf
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
Of jerry ven
Sent: Thursday, June 30, 2022 12:01 PM
To: Midrange Systems Technical Discussion <
Subject: [EXTERNAL] records between two dates
Hi,
How to filter records from a date field if it's split in CC YY
MM DD
usingfromEach field here with 2 length and decimal data type) using SQL
query
a file?specific
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
week, month, year and century ,and records between specific
dates
mailingSQL query on this file1 ?
Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistlist
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&reserved=0
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist<
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&reserved=0
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchor email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
ive.midrange.com%2Fmidrange-l&data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&reserved=0
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farch<
ive.midrange.com%2Fmidrange-l&data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&reserved=0
questions..
Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:
support@xxxxxxxxxxxxxxxxxxxx> for any subscription related
affiliate
Help support midrange.com by shopping at amazon.com with our
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazlink:
on.midrange.com%2F&data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&reserved=0
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famaz<
on.midrange.com%2F&data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&reserved=0
mailing--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistlist
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=05%7C01%7C%7
C034c6b1bda994ce2fd4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7
C1%7C0%7C637922032110632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s
data=m7dwPEgNWqV4UWa%2FBQ178kyqBaLWixJfIfIVNJ2by7o%3D&reserved=0
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchor email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
ive.midrange.com%2Fmidrange-l&data=05%7C01%7C%7C034c6b1bda994ce2fd
4508da5ab5557a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C6379220321
10632274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EZwt75YdXWAlkv
7CO27ZGxpmhrdfkegWElWL5xhPSPY%3D&reserved=0
affiliaterelated.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
questions.
Help support midrange.com by shopping at amazon.com with our
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazlink:
on.midrange.com%2F&data=05%7C01%7C%7C034c6b1bda994ce2fd4508da5ab55
57a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637922032110632274%7C
Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
aWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tUlTmPYWZozfUnZuYUZdIqtwg
TyfLbieenJ3q6UaAAs%3D&reserved=0
mailing--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
affiliatelistrelated
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
questions.
Help support midrange.com by shopping at amazon.com with our
relatedlistlink: https://amazon.midrange.com--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
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
relatedquestions.list
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
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
listquestions.--
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
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,list
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
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 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.