Hello Friends,
I have this TSQL sytax which shows me a table of requested columns, I want to save these columns as a view. How can I implement this.Thanks in advance of your efforts.
I have this TSQL sytax which shows me a table of requested columns, I want to save these columns as a view. How can I implement this.Thanks in advance of your efforts.
Code:
SELECT (CONVERT(VARCHAR(12),[Dat],106)) AS Expression,
SUM(CASE WHEN [Project] = 'ott' THEN [NO2] END) AS [ott]
FROM MyTable
WHERE (((Dat)>'2003/9/1')
AND (([Project]) IN ('ott')))
GROUP BY (Year([Dat])*12+Month([Dat])-1), Dat, (CONVERT(VARCHAR(12),[Dat],106))