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
Add Milliseconds to Datetime
Installing a Windows 7 network printer
Help caputring sql profiler trace
combo box - basic question
Quick Batch File Rename Question
Reading an Outlook inbox
unable to make MDE file
Cretaing a Union
Outlook Anywhere - Exchange 2007 (SBS 2008) and Outlook 2003 / 2007
combining word document with access report