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



Jennifer Martin wrote:
There are only two record formats and I need both. I created the file to hold a customer record and then all the ship to locations for the customer. The record formats contain different fields. I need it in this format to upload to another system. When I try using the physical files the ship to record is in the same row as the customer record and there are too many records to cut and paste the way I want it. I need a customer row, then a separate row following the customer row for all ship to addresses.

Since this is a logical file and it has two formats and the data seems to be from two different sources, I'm going to assume that it is based upon two different tables.

Click on Data / Get External Data. Select the Data Source that points to your system. It will then show you the Graphical Query builder and a list of tables in the library list of the Data Source. We don't want the Graphical part, we're going straight to SQL.

Click on the SQL button and enter the statement along these lines:

Select custno, 0 as shipto, custname as name
From SYSTEMNAME.LIBRARYNAME.CUSTFILE
Union All
Select custno, shipto, shipname as name
From SYSTEMNAME.LIBRARYNAME.SHIPTOFILE


That should get you there. Send the data back down to Excel and sort it by custno and shipto as desired.

Bill

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.