|
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, September 12, 2007 10:52 AM
To: Midrange Systems Technical Discussion
Subject: RE: CREATE INDEX and name only some columns
Charles, a really nasty appeared regarding the select *
into... when you were using an external DS. If you added
fields to the file and did not recompile (thus changing your
external DS) it used to just happily ignore the extra fields
at the end. Then IBM came out with a new release that
decided that was a bad idea and had the program drop to it's knees.
Anyone hear the myth about being able to put on new releases
and having 100% code compatibility on i5/os, unlike Windows?
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
"Wilt, Charles" <WiltC@xxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
09/12/2007 09:14 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc
Fax to
Subject
RE: CREATE INDEX and name only some columns
Waldon,
Actually, I was under the apparently mistaken impression that
you would
have to recompile since you'd
be changing the number of columns being returned and thus the
number of
variables you'd need to hold
the returned data.
However, a quick test shows that at least with a SELECT INTO
that doesn't
appear to be the case; but
only as long as the column is added to the end of row.
RPG retrieves data by ordinal position in the results set, it
apparently
doesn't care if there's more
columns than it was expecting.
Dropping a column would be a bad idea; but probably not a
real concern.
Somewhere, someone said that using SELECT * in a production
application
was a bad idea. IIRC, that
was a recommendation to follow no matter what DB or what language was
involved but I thought it really
was applicable to RPG. A quick google search, turns up at least one
result. The following reasons
apply to using SELECT * and any DB and language:
1) extra unneeded data returned
2) doesn't allow index-only access
3) Stability - applications could be accessing via ordinal position
instead of column name.
Point 3 is the is important to us since RPG with embedded SQL
always uses
ordinal position.
So I've learned that SELECT * doesn't have to mean a recompile, but I
think I'll still continue
specifying specific columns names in most cases.
Charles
-----Original Message-----
From: midrange-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx
[mailto:midrange-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx] On
Behalf Of Walden H. Leverich
Sent: Tuesday, September 11, 2007 6:59 PM
To: Midrange Systems Technical Discussion
Subject: RE: CREATE INDEX and name only some columns
1) Better performancethe program.
2) You can change the DB without needing to recompile all
I'm with you on #1 & #2 for DDS/LF, but since you say "same
reason you'd..." you seem to imply that both cases are true
in SQL too. I can see #1, but #2 isn't true, is it? If I
"select * from..." in an RPG program I can still change the
underlying table w/out a recompile, can't I?
-Walden
--
Walden H Leverich III
Tech Software
(516) 627-3800 x3051
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com
Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
--
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.
This e-mail transmission contains information that is intended to be
confidential and privileged. If you receive this e-mail and
you are not a
named addressee you are hereby notified that you are not
authorized to
read, print, retain, copy or disseminate this communication
without the
consent of the sender and that doing so is prohibited and may
be unlawful.
Please reply to the message immediately by informing the
sender that the
message was misdirected. After replying, please delete and otherwise
erase it and any attachments from your computer system. Your
assistance
in correcting 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 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.
--
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-2025 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.