× 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.



Hi Paul, No – Field1 in File2 and Field 1 in File 3
The value A can be in Field-1 File2 but NOT in Field 1 file 3

Hope that helps

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill

From: Paul Therrien [mailto:paultherrien@xxxxxxxxxxxxxxxxxx]
Sent: Friday, June 30, 2017 2:01 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Cc: Alan Shore <ashore@xxxxxxxx>
Subject: Re: Using SQl to obtain a field value from one file or another


Are you saying that Field 2 in File 2 and Field 2 in file 3 are mutually exclusive?

Can you have the key value in file 1 be i both file 2 and file 3?

If the key from file 1 exists in both file 2 and file 3 then what do you expect to see in your result?





Paul



On 2017-06-30 13:50, Alan Shore wrote:
Hi everyone
Before I forget - we are on V7r1
Happy 4th July weekend to the yanks
I may be pushing my luck - Friday afternoon before what could be a 4 day weekend for many people
But - here goes
I will try and keep this as simple as possible

I have 3 files
File-1 has one field with values
A
B
C
D
E
Etc.

File-2 contains 2 fields
Field 1 contains an alpha character with SOME of the values that are in file-1
Field 2 is just data

File-3 also contains 2 fields
Field 1 contains an alpha character with SOME of the values that are in file-1
Field 2 is just data

NOTE - the values A,B,C,D, E etc. will be in either File-2 or File-3 but NOT both

How can I combine whats in file-1 with File-2 field 2 and File-3 field 2 but in ONLY 2 columns
For example - this is what I am looking to produce from an SQL statement

A Field2 from File-2
B Field2 from File-2
C Field2 from File-3
D Field2 from File-3
E Field2 from File-2

I tried the following
Select File-1.Field1, File-2.Field2, File-3.Field2 from File-1 left join File-2 on
File-1.Field1 = File-2.Field1
left join File-3 on
File-1.Field1 = File-3.Field1

But that results in three columns - not 2

As always - all responses gratefully accepted

Alan Shore
E-mail : ASHORE@xxxxxxxx<mailto:ASHORE@xxxxxxxx>
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

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.