hi..i have problem in my select with union query in below select statement..
getting invalid column name dt error
Msg 207, Level 16, State 1, Line 2
Invalid column name 'dd'.
Msg 104, Level 16, State 1, Line 2
ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator.
select convert(datetime,date,103)as dd from tbl_Newappraisal
union select convert(datetime,issuedate,103)as dd from silk_issue order by convert(datetime,dd,103) asc