Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Result of SQL in one line
Sat, Apr 30 2016 3:46 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi All,

Is it possible from dbisam latest to combine results of a query to a
single line like:

Usual result:

First
Second
Third
...

What i want Smile

First,Second,Third

Thanks in advance,
Regards,
Hüseyin A.
Sun, May 1 2016 5:50 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Hüseyin,

Yes, there is the LIST function.
The syntax is:

LIST( <YourColumn> [,Delimiter] )

The LIST function concatenates all the values in <YourColumn> column into a single string value, using a delimiter to separate them.
The default delimiter is "," but you can specify another one.

Example:
SELECT LIST(FirstName) FROM Customers

--
Fernando Dias
[Team Elevate]
Sun, May 1 2016 5:57 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Fernando,

Works great, thanks Smile

Regards,

Hüseyin

On 01-05-2016 11:50, Fernando Dias wrote:
> Hüseyin,
>
> Yes, there is the LIST function.
> The syntax is:
>
> LIST( <YourColumn> [,Delimiter] )
>
> The LIST function concatenates all the values in <YourColumn> column
> into a single string value, using a delimiter to separate them.
> The default delimiter is "," but you can specify another one.
>
> Example:
> SELECT LIST(FirstName) FROM Customers
>
> --
> Fernando Dias
> [Team Elevate]
Image