tag:blogger.com,1999:blog-6468494060337676922.post200039952407667608..comments2023-06-27T07:13:24.638-04:00Comments on Timothy Chen Allen: SQL Server: How to concatenate field text across rowsTimothy Chen Allenhttp://www.blogger.com/profile/01463492077952428825noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6468494060337676922.post-57412412394085695192008-06-10T21:02:00.000-04:002008-06-10T21:02:00.000-04:00It worked for me. Thanks Tim, I agree with the Job...It worked for me. Thanks Tim, I agree with the Job Security part :) Are you still working at FEMA?<BR/><BR/>I gave you kudos here <BR/><BR/>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/d89e801ab681bdac#<BR/><BR/>and also here<BR/><BR/>http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/d72d4edfd7348d9c#Unknownhttps://www.blogger.com/profile/15231946473011354398noreply@blogger.comtag:blogger.com,1999:blog-6468494060337676922.post-42756286232491440282008-02-07T17:46:00.000-05:002008-02-07T17:46:00.000-05:00Urf, Sorry Roslen, I don't really know how you wou...Urf, Sorry Roslen, I don't really know how you would handle that. I've changed jobs and no longer work with SQL Server. I would quess that you could probably write a couple of functions-- one for the first 256 characters, one for the second, etc, and then use those to extract the concatanated field in chunks. Not pretty, but neither is the original soultion...Timothy Chen Allenhttps://www.blogger.com/profile/01463492077952428825noreply@blogger.comtag:blogger.com,1999:blog-6468494060337676922.post-12973367359787176412008-02-06T00:35:00.000-05:002008-02-06T00:35:00.000-05:00How do you deal with concatenated strings that exc...How do you deal with concatenated strings that exceed 256 characters? I'm using MSSQL 2000 and all my concatenated strings are truncated to the 256-character limit.<BR/><BR/>Thanks.roslenhttps://www.blogger.com/profile/01295650033963795131noreply@blogger.comtag:blogger.com,1999:blog-6468494060337676922.post-65016585596836980382007-10-04T03:21:00.000-04:002007-10-04T03:21:00.000-04:00Hi Tim,I have a table like thisItemCode DimensionC...Hi Tim,<BR/><BR/>I have a table like this<BR/><BR/>ItemCode DimensionCode Dim_Value<BR/>A100 D5001 10<BR/>A100 D5002 15<BR/>A100 D5003 17<BR/>A101 D5001 15<BR/>A101 D5002 10<BR/>A101 D5003 12<BR/><BR/>I need to Concatenate the DimValue for each ItemCode.<BR/><BR/>like this<BR/><BR/>ItemCode Item_Dim <BR/>A100 W:10/H:15/L:17<BR/>A101 W:15/H:10/L:12<BR/><BR/>---------------<BR/><BR/>The DimesionCodes are <BR/>D5001=W , D5002=H, D5003=L.<BR/><BR/>DataTypes for the fields<BR/>ItemCode is varchar(5)<BR/>DimensionCode varchar(6)<BR/>Dim_value numeric (10, 4)<BR/><BR/><BR/>I follwed your example but I am getting an error cannot convert datatype varchar to numeric. <BR/><BR/><BR/>How can I do it? Please Help.<BR/><BR/>thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6468494060337676922.post-51860943630758003922007-07-17T06:19:00.000-04:002007-07-17T06:19:00.000-04:00Glad it worked for you. This is one of those anno...Glad it worked for you. This is one of those annoyances in SQL Server that can only be solved with code (which is actually cool because it gives us a lot of job security!)Timothy Chen Allenhttps://www.blogger.com/profile/01463492077952428825noreply@blogger.comtag:blogger.com,1999:blog-6468494060337676922.post-67501907753542686532007-07-17T06:15:00.000-04:002007-07-17T06:15:00.000-04:00Thanks Timothy, that's really useful!Thanks Timothy, that's really useful!Anonymousnoreply@blogger.com