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
VBA - Remove Data Connections and Macros From Workbook
Add or Remove Programs Empty
VIEWING INTERNAL WEB SITES WITH FOREFRONT TMG CLIENT
Deletion of record - But HOW ? Very odd.
Permanently remove review tracking?
how can I compare two databases in foxpro to check if they are identical?
nVidia nForce Raid controller embedded in Proliant ML115 G5 Event 129
I want to hyperlink a image in pdf using vb.net code using iTextSharp.text and Imports iTextSharp.text.pdf class
Export table to another Access DB
WCF: can't figure out reliable session error