Sunday, March 2, 2014

UNION Query - text and date time formatting issue

I didnt get purpose of this. If you dont have any values from first select why include it at all? Anyways what you could do is put NULL for placeholders



SELECT CAST(NULL AS date) AS myDATE
, CAST(NULL AS time) AS myTIME
FROM
table1
UNION ALL
SELECT myDATE
, myTIME
FROM
table2



And wherever you want, you can put a filter on NULL to exclude them if needed




Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://ift.tt/19nLNVq http://ift.tt/1iEAj0c


No comments:

Post a Comment