Re: How to return column data as a single string?
From: Joe Celko (joe.celko_at_northface.edu)
Date: 03/26/04
- Next message: ksnsacc_at_hotmail: "Re: Using openrowset to select foxpro table data through odbc ?"
- Previous message: Louis: "Trigger invoking VB passing parameters"
- In reply to: Rickard Axne: "Re: How to return column data as a single string?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 14:01:13 -0800
>> Or future versions could possibly allow SUM() on further datatypes eg
varchars as well? <<
I was just hoping that T-SQL would finally get the || concatenation
operator right.
There is a LIST() function in Sybase SQL Anywhere which does what you
described, but it was not complete the last time I looked at it.
1) It did not give an optional separator; used a comma even if there
were commas in the strings.
2) It did not have LIST(DISTINCT <string exp>) to remove redundant dups.
This is required in all aggregate functions in standard SQL.
3) It did not have a sorting option within the string.
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: ksnsacc_at_hotmail: "Re: Using openrowset to select foxpro table data through odbc ?"
- Previous message: Louis: "Trigger invoking VB passing parameters"
- In reply to: Rickard Axne: "Re: How to return column data as a single string?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|