Viewing 15 posts - 601 through 615 (of 1,219 total)
To get the data for the most recent row, use row_number:
LEFT JOIN (SELECT UserID, AdressID,
...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 4:12 pm
The upper levels of the indexs are not scanned, nor are they always full. No, you should not be worried about fragmentation in these levels as long as leaf level...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 4:07 pm
There is a problem with that solution: it relies on undefined behaviour. That is, there are no guarantees that SELECT @sql = @sql + col with produce what you expect....
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 4:01 pm
Blimey? Must be some lingo local to Port Moresby.
Any way, since I don't think that there was a post with CROSS JOIN for unpivotting, here is an example, taken...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 3:34 pm
Glenstr (9/11/2013)
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 1:29 am
Ah, I see. I had just completed an unpivot solution (using CROSS JOIN) in another thread prior to reading this thread. I need to look into this idea more.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 12, 2013 at 1:21 am
I'm sorry, but I need to be quick; I'm already past my bedtime.
You need a table of numbers - or in this case a table of dates to fill up...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 4:19 pm
Seems like your manager needs a promotion to a position where he can't make any damage. :--)
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 4:16 pm
The reason that it does not work is that the plain user does not have access to that other database. You could achieve this by enabling the guest user, but...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 4:12 pm
While you are at it, you may also be interested in beta_lockinfo. Or may be you are not. But since I wrote it, I had to plug it. :--) The...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 3:56 pm
ChrisM@Work (9/4/2013)
Or CROSS APPLY VALUES
Somewhat odd to use CROSS APPLY here. The normal is CROSS JOIN. Of course since there is no correlation on the right side, the CROSS APPLU...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 3:53 pm
Here is the pattern for a unpivot operation:
SELECT s.Name, CASE n.n WHEN 1 THEN s.Mark1
...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 3:50 pm
Beside checking SQL Server Agent for jobs, also check Task Manager in Windows.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 3:33 pm
SQLSteve (9/11/2013)
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 3:17 pm
Grant Fritchey (9/11/2013)
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
September 11, 2013 at 10:19 am
Viewing 15 posts - 601 through 615 (of 1,219 total)