SQL Server, SSRS and Crystal Reports
Showing posts with label
Column alias
.
Show all posts
Showing posts with label
Column alias
.
Show all posts
Wednesday, 10 November 2010
Column aliases and derived tables in TSQL 2005 - SQL
SELECT
YearMonth,
COUNT
(JobLogID)
AS
JobCount
FROM
(
SELECT
JobLogID,
CONVERT
(
VARCHAR
(7), JobLogSignOffTimeStamp, 121)
AS
YearMonth
FROM
JobLog
WHERE
JobLogSignOff =
'1'
)
AS
J
GROUP BY
YearMonth
ORDER BY
YearMonth;
Older Posts
Home
Subscribe to:
Posts (Atom)