﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / How to join Values / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 00:39:03 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to join Values</title><link>http://www.sqlservercentral.com/Forums/Topic1407037-391-1.aspx</link><description>Thanks Experts Its work !</description><pubDate>Tue, 15 Jan 2013 21:33:46 GMT</pubDate><dc:creator>kiran.rajenimbalkar</dc:creator></item><item><title>RE: How to join Values</title><link>http://www.sqlservercentral.com/Forums/Topic1407037-391-1.aspx</link><description>Or like this:[code="sql"]SELECT CASE num WHEN 0 THEN '' ELSE 'D' END +     RIGHT(num*POWER(10, 3-FLOOR(LOG10(CASE num WHEN 0 THEN 1 ELSE num END))), 4)FROM abc[/code]What??? :-P</description><pubDate>Tue, 15 Jan 2013 01:59:55 GMT</pubDate><dc:creator>dwain.c</dc:creator></item><item><title>RE: How to join Values</title><link>http://www.sqlservercentral.com/Forums/Topic1407037-391-1.aspx</link><description>[code="sql"]SELECT 'D' + LEFT(CAST(num AS VARCHAR(4))+'0000',4) FROM abcSELECT ISNULL('D' + LEFT(CAST(NULLIF(num,0) AS VARCHAR(4))+'0000',4),'0') FROM abc[/code]</description><pubDate>Tue, 15 Jan 2013 01:35:24 GMT</pubDate><dc:creator>ChrisM@Work</dc:creator></item><item><title>How to join Values</title><link>http://www.sqlservercentral.com/Forums/Topic1407037-391-1.aspx</link><description>Hi Professional ,Create Table,[code="sql"]CREATE TABLE abc(num int)[/code]Insert Into [code="sql"]insert into abc values (1010)insert into abc values (111)insert into abc values (99)insert into abc values (0)[/code][code="sql"]SELECT 'D'+ CAST(num AS NVARCHAR) FROM abc[/code]Now I am getting Result as below,D1010D111D99D0But I have to show result as like below,D1010D1110D99000So please suggest me how to do this ?Regards,KRAj</description><pubDate>Mon, 14 Jan 2013 23:26:06 GMT</pubDate><dc:creator>kiran.rajenimbalkar</dc:creator></item></channel></rss>