Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2006, 02:35 PM
Authorized User
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting large columns into a single row

I want to convert the columns of varchar(400) into a single row. i tried using coalesce but it doesnt works for large amount of data
can anyone please help me in this.

this is the snapshot of table which i am using:---

D0201 as [Nominee Emp No]
D0202 as [Nominee DU Code]
D0203 as [Nominee Project Code]
D0204 as [Nominee DM Email ID]
D0205 as [Nominee Location]
D0206 as [Nominator Email ID]
D0307 as [Specialized domain competency (eg. RETL, Banking, Insurance)]
D0308 as [Quantify the benefits (for e.g. Due to domain competency the KT was given in a day and this resulted]
D0309 as [Any domain specific certifications]
D0310 as [Paper presentation in domain area ]
D0323 as [K-Shop Material]

the coalesce is able to convert into a single row of length 256 characters max, whereas in my case it will go beyond 2000.
Any pointers will be of great help.

Regards
Rahul Pokharna
__________________
regards
rahul pokharna
 
Old January 9th, 2006, 12:37 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

What is the code you are using? Why not just concatenate into a column or variable of VarChar(8000)?

Jim

 
Old January 9th, 2006, 11:00 AM
Authorized User
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks jim for ur reply. the max length for a columns was set to 256 only. i reseted it to 8000 and it is working fine now.

regards
rahul pokharna
 
Old January 10th, 2006, 02:14 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Glad you got it working






Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing checkboxes value in a single row abhishekkashyap27 C# 2005 2 April 8th, 2008 12:13 AM
Consolidating multiple occurences in a single row ssray23 SQL Language 11 May 18th, 2007 11:00 AM
show columns with same ID in the same row yuvalk SQL Server 2005 4 February 2nd, 2007 07:46 PM
How to send multiple columns’ data of a single row swadhinm ASP.NET 1.x and 2.0 Application Design 2 June 1st, 2005 07:59 AM
write out row data in columns MrBillBill PHP Databases 4 October 7th, 2004 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.