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
Import a result set from DB2 to Access using TransferDatabase
Second login required when starting Outlook?
Network Access: Allow anonymous SID/Name translation reg key?
Visual Studio console application without visible console
Need to strip string / email from message body, with Outlook XP VBA?
Asking a ComboBox about its contents
How to handle Administrator Alert ?
Active X Can't Create Component
Automate DHCP client computer add/remove via command line on Windows 2003 DHCP Server
Drive letter flash drive