﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Analytical Applications / Teradata   / Union Character Data with Numeric data / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 16:11:20 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Union Character Data with Numeric data</title><link>http://www.teradata.com/teradataforum/Topic9566-5-1.aspx</link><description>I don't know about your case, but for any Set operations the first select determines the datatype and format of that column.You should check if there's a Date column in your first select and cast it to Varchar.Dieter</description><pubDate>Fri, 02 Nov 2007 04:47:08 GMT</pubDate><dc:creator>dnoeth</dc:creator></item><item><title>Union Character Data with Numeric data</title><link>http://www.teradata.com/teradataforum/Topic9566-5-1.aspx</link><description>Hi All,I am trying to create a XML output by running a Teradata SQL . For this I need to have multiple Union sets in the query so that the order is maintained.I need to have a lot of commented XML code in quotes just used as dummy select in my query. But down the blocks where the data fetch is required I am facing an issue.I am trying to convert a numeric value fetched from the Database using the Cast function.Eg:Select XMLText from(Select 1 XML Order , XMLText from (select cast(' ' as Varchar(3000))  XMLText ;) aUnion ALLSelect 2 XMLORder, cast (sum(units) as Varchar(30) XMLTextIt throws an error 3617:  FORMAT 'YYYY-MM-DD' does not match the datatype. Please Help.</description><pubDate>Wed, 31 Oct 2007 18:27:39 GMT</pubDate><dc:creator>SriK</dc:creator></item></channel></rss>