Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Combining multiple rows into a single row - forum topic by wayneoon

$
0
0

Hi All,
 
This may have come up before but I'm not getting the answers that I'm seeking for, so I'm going to start a new thread here.
 
Here's the problem:
 
I have a table that stores customer info, let's call it Cust.
The table is loaded by an external process and sometimes it will produce multiple rows.
 
Eg:
 
Cust_Id   Name   Age   TelNo  Address1 Address 2
1             ABC      19      ?         ?                ?
1             ABC                ?        AAAAA         BBBBB
1             ABC      ?       1111    ?                ?
 
In order to avoid multiple rows being selected, I'm trying to write a post-load process that will select rows from this table, and merge the information into a single row , and the expected result should be this:
Cust_Id   Name   Age   TelNo  Address1 Address 2
1             ABC       19      1111   AAAAA    BBBBB
 
Can anyone help to point me to the right direction to get this working? I have been looking at various solutions but none seems to be working as expected. Appreciate the help.

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>