As an example I have this query here
SELECT DISTINCT convert(varchar(10), PickupDate ,105) AS [Pickup dates]
FROM info.dbo.A_Query_Detail AS D
INNER JOIN info.dbo.A_Query_Header AS ACQ on ACQ.ID = D.Header_ID
WHERE D.HeaderID = @HeaderID
AND ACQ.PriceType = 'Pickup'
GROUP BY
Adrid, convert(varchar(10), PickupDate ,105)
What I want to get here is only the column name without it conflicts with the above query. So my result would be something like: "Column_Date" or Pickup dates as stated above. I have red something about sys.tables but I can't seem to make it work with the above code.
[Pickup dates]and it will beVarChar(10).*.