Microsoft
Software
Hardware
Network
Question : Add Alias to Union query
I have the following union query:
SELECT ProductId, ProductCode, ProductDescription FROM qryProductsStockTakeAdjust
mentReport
UNION SELECT Ast, Desc FROM tblAsterisk
ORDER BY Productcode;
It does not run because the number of columns do not match. How do I add an alias to get the same numbe rof columns on each side?
Answer : Add Alias to Union query
For example, add Null:
SELECT ProductId, ProductCode, ProductDescription FROM qryProductsStockTakeAdjust
mentReport
UNION SELECT Ast, [Desc], Null FROM tblAsterisk
ORDER BY Productcode;
Note: DESC is a reserved keyword.
(°v°)
Random Solutions
Very simple sum question
Aggregate Function
SendKeys to a minimzed window
SBS2003 Server Mail store recovery
Validate front end server configuration error
How can I get the windows version from a dos prompt
LINQ Query not yielding expected results
"Your changes could not be saved to {filename} but were saved to a temporary document named {3F8C6100}. Close the existing document, then open the temp document and save it under a new name"
PerformancePoint error - Cannot connect to data source
VS2008: fatal error LNK1112: module machine type 'THUMB' conflicts with target machine type 'ARM'