× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I just added the 'if the field is blank' stuff trying to get it to work by
narrowing the rows returned; in this case it really doesn't matter since I'm
wanting to restore the 'printer' value from the backup file - if it's blank
in the backup, no biggie.

TomH


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Wednesday, December 09, 2009 12:37 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Help with a fairly basic SQL (I think)

I did not notice that he had the adp file in the subselect. but to
expand on what you said.



Update adp/locnmstrpf a
Set a.printer =
(select b.printer from tomh/locnmstrpf b
Where a.locn = b.locn and b.printer <> ' '
)
WHERE a.printer = ' '


I didn't see (still don't) that he wants to do this only if that field is
blank. In fact, I didn't see any mention of blanks. What I see is "all
records." But in case that's what he really wants: good job. :)

I have two files: TOMH/LOCNMSTRPF, ADP/LOCNMSTRPF
- both the same layout and field names (the TOMH
file is a backup of the ADP file). Key field for
each is called LOCN. For all records in ADP/LOCNMSTRPF,
I want to update one field ("printer") with data
from the corresponding record/field in TOMH/LOCNMSTRPF.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Television is a device that permits people who haven't anything to do to
watch people who can't do anything."
-- Fred Allen



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.