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



On 27-Mar-2012 13:55 , Stone, Joel wrote:
I have the following file:

CUST# Code
------ -------
0001 A
5555 A
5555 Z
5555 B
6666 A
8888 A
8888 Z

Is there a simple way in SQL or QM or Query to make it look like:

Cust# CodeA CodeB CodeZ
------ ------- ------- --------
0001 A
5555 A B Z
6666 A
8888 A Z

Assume physical files exist in the formats shown above.

End result desired is an excel spreadsheet.

Is the given data a legitimate likeness\representation of the actual scenario? I suspect from other posts, possibly not so much.
Is the data in the original file uniquely keyed for both columns (CUST#,CODE) to ensure no duplicates?
Is the set of Code values limited to the three values ('A','B','Z') or to another limited\known set?
If not static for those three-codes or a known n-codes, should the effect of the query result be dynamic to add the additional /columns/ to the result set?
Is the output as an excel-supported import format, such as export as CSV an option; i.e. instead of as a VIEW or TABLE, an effective export-to-text?
Is collation of physical row data relevant?
Does the actual data allow collation by standard sort for the generated columns; i.e. does "select distinct 'Code' concat CODE order by 1" properly /names/ the columns being added?
What OS release is being used?

Regards, Chuck

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.