(select
(case when CONVERT(VARCHAR(10), max(t1.Date), 103) = '01/01/1900' then '' else
CONVERT(VARCHAR(24), max(dbo.UTC2BaseEntryWithDST(t1.Date,20,0)), 103)
END)as Date
from Table t0
inner join Table2 t1 on t1.ID = t0.ID)
but I'm getting an error in Report Builder
the query contains more than one unnamed or duplicate field name, please specify unique column
How to put the "date" name at the end of the query? Thanks
CodePudding user response:
Put double quotes around the Date
column name to have an alias that is also a key word in SQL (or uses special characters, such as spaces):
as "Date"