I want to do following two select query result A and B in two column_A and column_B. I am trying following logic but it doesn’t working in SQL Server 2008 R2
select Column_A, Column_B
From (
SQL query for A
,
SQL query for B
)
Could someone please verify whether my logic is wrong or right?
You can nest select queries like this
This combines the rows of one data source (table or sub query) with the rows of the other one. If you query from several data sources, you will usually have to join them in some way. If you do not, you will get a Cartesian product, which combines each row of one source with each row of the other source.