|
-----Original Message-----
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
explicitly in the CREATE VIEW.
--
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-----much used
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles
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 aren't keyed,
the only way to read the data is sequentially, thus not of
when you're using HLL native I/O.giving it a
Charles
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Crosby
Sent: 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") and all it's
logicals, and am redoing it in SQL DDL ("SLSALL"). By
date rangedifferent name and populating both files for now, I can convertissue, I
programs individually until finished.
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 many reasons,interested
including user queries.
Users typically wanted in a single month. When they _were_
in more than a month, they queried over one of the logicals, as Ieverything in a
built all logicals over all members.
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 detail on theusers can
system) called SLS200701, SLS200702, etc. In this way the
still get individual months without having to select by
happens toeach 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 my arm isId on the
hurting from trying to pat myself on the back so much.
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 I have toto do this?
specify LVLCHK(*NO). I hate LVLCHK(*NO) in production.
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
intended to beshow 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.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 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.