SQL Server - Group Concat on Temp Table (SQL2000)

Asked By Brave Cobr
14-Jul-08 08:23 AM
Hi,

I'm having a problem with a group concatenation on a temporary table in a
stored procedure.
I've been looking at
http://omnibuzz-sql.blogspot.com/2006/06/concatenate-values-in-column-in-sql.html
which provides me with a perfect solution for SQL2005 where I can do the
concat in 1 single statement. However, on SQL2000, a UDF is suggested to get
the same output.  The problem is that I need to do the concatentation on a
temporary table. UDF's don't alllow that.

How can I do a session safe (!) group concatenation, as described in the
above link, on a temporary table in a stored procedure on SQL2000.
SQL Server 2005
(1)
SQL Server 2000
(1)
Stored procedure
(1)
CobraCan
(1)
Concat
(1)
Peremanent
(1)
Omnibuzz
(1)
Alllow
(1)
  Uri Dimant replied...
14-Jul-08 08:29 AM
Brave Cobra
Can you show sample data and an expected result?
Workaround  is to create a peremanent table and just before inserting a new
data set truncate the old data
  Dan Guzman replied...
14-Jul-08 08:30 AM
Have you considered using a cursor in your stored procedure?

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
  Razvan Socol replied...
14-Jul-08 08:31 AM
See: http://www.projectdmx.com/tsql/rowconcatenate.aspx

--
Razvan Socol
SQL Server MVP
  Brave Cobra replied...
14-Jul-08 08:35 AM
Thanks for your reply.
I thought so as well, but that wouldn't be session safe. When 2 users
call the stored procedure at the same (or nearly the same) time, that
would cause a problem of incorrect data. Locking the table would solve
this either. I really need the 'temp' session safe functionality of the
table. Making it permanent shares it among the users. Correct me if I'm
wrong here!

Brave Cobra
Create New Account
help
MSDE on Windows 2003 R2 box, new DL385G6 - Install Fails during SQL Services SQL Server I have been finding that I am having trouble with the Crystal Reports Server XI installation failing when it is dealing with SQL. So, as a thought and in case there was something wrong with my SQL portion of the isntall. I thought ok, I will try installing the actual MSDE application direct from Microsoft. So, I downloaded the MSDE for SQL 2000 (which is msde2000a.exe), set my switches and off to the races. It quit when
Why_can’t_recursive_queries_contain. . .? SQL Server hi I hope I didn = 92t put too many questions 1) Why can = 92t recursive queries also be unioned together with UNION operator ( instead they must use UNION ALL )? thanx SQL Server Programming Discussions SQL Server 2008 (1) SQL Server 2005 (1) SQL Server 2000 (1) SQL Server (1) Oracle (1) Ruby (1) MichaelcoAToptonlineDOTnet (1
KB948110 / MS08-040, SQL 2000 & sa authentication SQL Server Hi everyone, I'm having an issue installing KB948110 / MS08-04 security patch for SQL Server 2000 Standard. I'm getting the message: 1 or more SQL Server instances could not verify your account information when I provide sql authentication details when
Access 2007-> SQL Server2005 "connection was forcibly closed", GNE 1 SQL Server SQL, Server2005, "connection, was, forcibly, closed", GNE, 1" / > Hi, with an Access 2007 application, I have a very big problem connecting an SQL Server 2005. The scenario: - nearly 200 clients with Windows XP Professional (in an Active Directory Domain) - clients uses WAN, LAN and WLAN, different locations - one SQL Server 2005 EE, uses actually 36 databases, the Access 2007 application uses 2 of them
SQL Express: Failed Reinstall SQL Server Dear Setup Experts: I am trying to reinstall SQL Express after playing with it some. I uninstalled it, and now, it refuses to reinstall in the face. Any ideas what this log file means and how I can get SQL Express installed? I really do not want to have to reinstall my whole system. * ** ** Start of Log File Overall summary: Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup. Exit code (Decimal): -2068643839 Exit facility code: 1203