Retrieving value for multiple records into single record

Database
Enthusiast

Retrieving value for multiple records into single record

Hi All,

I need to retrieve data from multiple records and store it into a single column seperated by ';'.

For example, the table test_vt has column A and two records.

A

5

10

I need to select column A from this table and store into another table test_vt1 as below.

B

5;10

Can you please help me with this?

Thanks,

Aarsh Dave

1 REPLY
Enthusiast

Re: Retrieving value for multiple records into single record

In 14.10,

sel oreplace(oreplace(tdstats.udfconcat(trim(cast(a as char(10)))),'"'),',',';') from tbl;

Rglass