﻿<?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 2005 / T-SQL (SS2K5)  / Coalesce Query / 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>Sat, 18 May 2013 21:00:46 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Coalesce Query</title><link>http://www.sqlservercentral.com/Forums/Topic976278-338-1.aspx</link><description>All data types in the coalesce function must be the same.Try converting the ProductID into a varchar which has a length equal to the larger of productclass and productcolor.e.g.[code]Coalesce (ProductClass,ProductColor,convert(varhchar(100), ProductID))[/code][quote][b]Kirman (8/27/2010)[/b][hr]Hi,I have the following Coalesce Query Coalesce (ProductClass,ProductColor,ProductID)ProductClass and ProductColor are of the same datatype varchar , but the ProductID is of the Integer Data Type.When I execute the query it gives the Data Conversion Error i.e. Cannot Convert from int to character data type.Can anyone help me in resolving the same.And also :Where exactly one can use the Coalesce Function.Thanks[/quote]</description><pubDate>Fri, 27 Aug 2010 05:22:31 GMT</pubDate><dc:creator>SQLZ</dc:creator></item><item><title>Coalesce Query</title><link>http://www.sqlservercentral.com/Forums/Topic976278-338-1.aspx</link><description>Hi,I have the following Coalesce Query Coalesce (ProductClass,ProductColor,ProductID)ProductClass and ProductColor are of the same datatype varchar , but the ProductID is of the Integer Data Type.When I execute the query it gives the Data Conversion Error i.e. Cannot Convert from int to character data type.Can anyone help me in resolving the same.And also :Where exactly one can use the Coalesce Function.Thanks</description><pubDate>Fri, 27 Aug 2010 04:57:57 GMT</pubDate><dc:creator>Kirman</dc:creator></item></channel></rss>