Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How can I query two different columns that make up one column?

$
0
0

I have a Report Request that gets relatively the same information from two different tables and two different columns and will be identifiable as the same column within a report. I don't think I can do this as a UNION or UNION ALL because the column names are different and their data types might be different as well. I thought about breaking each separate piece into Common Table Expressions but I'm not sure that that's the answer either. I am now thinking of doing it via a CASE Statement but I don't know how I would instruct the CASE to take its value from one place and then the other.

Any ideas as to how I can try and make this happen?

Thanks in advance for your review and am hopeful for a reply.

PSULionRP


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>