Reputation
6,949
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 8 22
Newest
 Caucus
Impact
~181k people reached

2d
awarded  Caucus
Jul
25
answered SSIS - Best way to insert large number of rows
Jul
25
comment How to get exact year difference between two dates in SQL Server?
But most of the answers to that question are rubbish and get thrown by leap years. The YYYYMMDD method works every time.
Jul
25
answered How to get exact year difference between two dates in SQL Server?
Jul
25
comment Sorting in dd/mm/yyyy format group by date
And get rid of the quotes around your zero. That's not meant to be a string.
Jul
25
comment Sorting in dd/mm/yyyy format group by date
Order by x.TransDate in that last example, because otherwise you're ordering by the output column
Jul
22
answered bring the output into single column from a table as vertical order
Jul
22
comment Log shipping large DBs - what about the log?
Make sure you have backup compression on...
Jul
20
answered Help writing query for MS SQL Server
Jul
18
answered Select columns dynamically from sql server table
Jul
16
revised For XML PATH error (SQL Server 2008 R2)
edited body
Jul
16
answered For XML PATH error (SQL Server 2008 R2)
Jul
16
answered sql join query through Adventure works database
Jul
16
answered Effective indexing and querying of overlapping date/time ranges
Jul
16
revised NC Index not being used
deleted 71 characters in body
Jul
15
answered NC Index not being used
Jul
10
revised Indexing order by columns
added 466 characters in body
Jul
10
answered Indexing order by columns
Jul
7
answered Pivots giving too many results
Jul
6
comment Creating a stored procedure and adding date manually to filename
Or better still: DECLARE @query_attachment_filename NVARCHAR(255) = 'pca-test-' + CONVERT(CHAR(8), GETDATE(), 112) + '.csv';