|
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Crosby
Sent: Tuesday, September 18, 2007 12:41 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Another SQL episode - VIEW formats
Same fields (see the response to Rob, I did SELECT *).
The format level ID on the TABLE is:
Record Format List
Record Format Level
Format Fields Length Identifier
SHRECORD 33 85 31FEBF6E48B30
The format level ID on the VIEWs are:
Record Format List
Record Format Level
Format Fields Length Identifier
SHRECORD 33 85 34414193CBB64
--
Jeff Crosby
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
The opinions expressed are my own and not necessarily the
opinion of my company. Unless I say so.
-----Original Message-----can convert
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles
Sent: Tuesday, September 18, 2007 12:28 PM
To: Midrange Systems Technical Discussion
Subject: RE: Another SQL episode - VIEW formats
Well are you just lucky to be on v5r4.... <grin>
So what is different?
Charles
-----Original Message-----explicitly
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Crosby
Sent: Tuesday, September 18, 2007 12:23 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Another SQL episode - VIEW formats
Actually, the RCDFMT name is the same, because I stated so
in the CREATE VIEW.opinion of
--
Jeff Crosby
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
The opinions expressed are my own and not necessarily the
my company. Unless I say so.Wilt, Charles
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
aren't keyed,Sent: Tuesday, September 18, 2007 11:56 AM
To: Midrange Systems Technical Discussion
Subject: RE: Another SQL episode - VIEW formats
Jeff,
If you look at the output of the DSPFD command, you'll see why.
The record format name is different for the view.
Honestly, I've never used views from RPG. Since they
Jeff Crosbythe only way to read the data is sequentially, thus not ofmuch used
when you're using HLL native I/O.
Charles
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
and all it'sSent: Tuesday, September 18, 2007 11:07 AM
To: 'Midrange Systems Technical Discussion'
Subject: Another SQL episode - VIEW formats
I took our DDS defined sales history file ("SLSHST")
giving it alogicals, and am redoing it in SQL DDL ("SLSALL"). By
different name and populating both files for now, I
many reasons,programs individually until finished.issue, I
Umpteen years ago, when performance (and disk space) was an
made SLSHST multimember. Each month was in a differentmember named
SLS200701, SLS200702, etc. This worked great for
detail on thelogicals, as Iincluding user queries.interested
Users typically wanted in a single month. When they _were_
in more than a month, they queried over one of the
built all logicals over all members.everything in a
As you know, multimember is a no-no in SQL. So I put
single member in the TABLE SLSALL. Then, thinking I wasbeing smart,
I created a VIEW for each month (we keep 24 months
change listmy arm isdate rangesystem) called SLS200701, SLS200702, etc. In this way theusers can
still get individual months without having to select by
each and every time. All is well.monthly reports
Getting even smarter, I decided "Hey - for all those
and summaries and whatnots I generate for a single month,why don't I
just do an OVRDBF to the view for the month I want andvoila! After
all, the view is already there, use it." By this time
I have tohurting from trying to pat myself on the back so much.Id on the
Pride goeth before a fall. Lo and behold the format level
VIEWs are different than the format level Id on the TABLE.(Although
the format level ID is the same for eachthey have
VIEW.) I looked at the INDEXes I built over the TABLE and
the same format level ID as the TABLE. To make it work
change listhappens tospecify LVLCHK(*NO). I hate LVLCHK(*NO) in production.to do this?
Is this not a good use for VIEWs? Is there a smarter way
OTOH, would you expect a VIEW to have the same format levelID as the
TABLE? I _do_ have an INDEX built by date. The idea ofthe VIEW was
not to have to select by date range over and over and over.
About the time I really think I'm getting SQL, something
show me I'm not yet really 'thinking' in SQL.opinion of
Thanks for any insight.
--
Jeff Crosby
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
The opinions expressed are my own and not necessarily the
my company. Unless I say so.
--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
intended to beoptions,please take
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
a moment to review the archives at
http://archive.midrange.com/midrange-l.
This e-mail transmission contains information that is
confidential and privileged. If you receive this e-mailand you are
not a named addressee you are hereby notified that you are notdoing so is
authorized to read, print, retain, copy or disseminate this
communication without the consent of the sender and that
prohibited and may be unlawful. Please reply to the messagemisdirected.
immediately by informing the sender that the message was
After replying, please delete and otherwise erase it and anycorrecting
attachments from your computer system. Your assistance in
this error is appreciated.
--
This is the Midrange Systems Technical Discussion
(MIDRANGE-L) mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
intended to beplease takeoptions,please take
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
a moment to review the archives at
http://archive.midrange.com/midrange-l.
--
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,
a moment to review the archives at
http://archive.midrange.com/midrange-l.
This e-mail transmission contains information that is
confidential and privileged. If you receive this e-mailand you are
not a named addressee you are hereby notified that you are notdoing so is
authorized to read, print, retain, copy or disseminate this
communication without the consent of the sender and that
prohibited and may be unlawful. Please reply to the messagemisdirected.
immediately by informing the sender that the message was
After replying, please delete and otherwise erase it and anycorrecting
attachments from your computer system. Your assistance in
this error is appreciated.please take
--
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,
a moment to review the archives at
http://archive.midrange.com/midrange-l.
--
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 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.