|
|
-
Mike Lewis Posted 6 Months ago through Blogs
I wanted to find a way to save space when storing text in Windows Azure SQL Database. On-premise SQL Server allows page and row compression, which is currently not available in the cloud. ...
|
-
Mike Lewis Commented 6 Months ago through Blogs
It is worth noting that detaching a database clears the query cache, so use with caution. Option #1 above is the recommended method of moving databases. There are also potential file permission issues with detaching databases. I cover it here: [http:...
|
-
Mike Lewis Commented 7 Months ago through Ask
Here's what I'm talking about with the dynamic SQL. It doesn't include the final summary row at the bottom but it gives you an idea as to how a dynamic PIVOT statement can be constructed:
if object_id('tempdb..#pivot') is not null
drop tab...
|
-
Mike Lewis Commented 7 Months ago through Ask
Hi Bubai,
If the UserName comes from a database table, and the query needs dynamically pull in those UserNames, then your only option is to construct a PIVOT query using dynamic SQL. It's not straightforward, especially as you're trying to sum times...
|
-
Mike Lewis Commented 7 Months ago through Ask
Hi Emile,
It sounds as though you need to get the CalcDate out of the stored proc? If so, then it really depends on the results of the first query. If it always returns a single row then this can be done by defining an output variable, e.g.
...
|
-
Mike Lewis Commented 7 Months ago through Puzzles
Sounds similar to mine. It was running in about 3.8s in the end. It will be interesting to see if anyone out there has come up with a solution significantly quicker!
If I have the time I'll go back over it and see if there are any improvements possibl
|
-
Mike Lewis Solved 7 Months ago through Puzzles
It works, but hasn't been optimised. Feels a bit long winded too.
|
-
Mike Lewis Commented 7 Months ago through Puzzles
It works, but hasn't been optimised. Feels a bit long winded too.
|
-
Mike Lewis Commented 7 Months ago through Puzzles
I haven't tried any of these challenges for a while, and back when I used to do them regularly there was a few of us who would post timings and test results to give everyone an idea of how other solutions were performing. Is anyone willing to share some d
|
|
|