|
Vern
I have to agree with you.
As far as SQL is concerned, a file is a file is a file.
But many people come from many different backgrounds and a newbie (or even
a not-so-newbie) trying to use and learn SQL will use the phrases that
he/she understands and uses. I don't mind asking questions to obtain some
further understanding of the original question, after all there's no such
thing as a stupid question.
Alan Shore
NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill
midrange-l-bounces@xxxxxxxxxxxx wrote on 02/13/2008 01:29:22 PM:
Alanupon
You know all this, I'm just piggy-backing on your post.
If "flat file" means a one-field record, substr(field, 5, 10) works
- the contents starting at position 5 for 10 characters.
If a "non-keyed file", no different from any other physical file.
I really wish we'd stop talking about flat files anymore - that term
is pretty meaningless, seems to me, in this day and age. A PF is a
PF is a table is a table.
HTH
Vern
-------------- Original message --------------
From: Alan Shore
John,
Without sounding sarcastic, YOU tell the system how to update based
updatewhatever match conditions apply.
When you said "flat" file, do you mean :-
a non-keyed file?
a file with one field in the record?
Alan Shore
NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill
midrange-l-bounces@xxxxxxxxxxxx wrote on 02/13/2008 10:46:30 AM:
I am not at all proficient in SQL. I was not aware that SQL could
wherea
table, based on a flat file. How would SQL know where the values
in the
flat file?
John McKee
Quoting "John Arnold (MFS)" :
For the column where you want the new value use,
Case when mrc = yyy then xxx end as id
In your select statement that creates the flat file.
John Arnold
(301) 354-2939
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Tuesday, February 12, 2008 11:34 PM
To: Midrange Systems Technical Discussion
Subject: Update a column in a table from a flat file
My earlier question has been resolved. Can't skip a key field in a
database and get decent performance.
Now, I wondering:
Run the Crystal report. Export the rsssults to a flat file. First
field would be a complete primary key to the MS-SQL database. Third
field would be the new value for a single specified field.
One possibility would be to modify the text file to read like this:
several
update clinical set id= xxx where mrc=yyy
The above line would be modified so that a text file would have
mailingthousand individual update commands. The file would be input to a
command line program, name eludes me for the moment.
Is there a way to do all the updates with a single command?
John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
take aunsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
mailinghttp://archive.midrange.com/midrange-l.moment to review the archives at
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailinglist
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)
listlist
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
listTo 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
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-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.