Viewing 15 posts - 2,131 through 2,145 (of 2,458 total)
Ditto what Jack said.
I always install sp_whoisactive and could not live without it (I run version 11.something). The most notable advantage over sp_who or sp_who2 is that you can...
September 10, 2013 at 4:15 pm
Do you even need table1?
I have this:
Sample data (table1 included):
USE tempdb
GO
IF OBJECT_ID('tempdb..table1') IS NOT NULL DROP TABLE table1;
IF OBJECT_ID('tempdb..table2') IS NOT NULL DROP TABLE table2;
CREATE TABLE table1
(id int...
September 10, 2013 at 2:44 pm
Any ideas on as to why the index rebuild task runs so quickly ?
Either have a few really small indexes, a blazing fast server or not all the indexes are...
September 10, 2013 at 8:04 am
The short answer is: Yes, absolutely - there are several different ways.
I have done this kind of thing many times but need to better understand your requirement to...
September 10, 2013 at 7:38 am
I'm assuming that "reversing columns and rows" you mean that the data needs to be pivoted.
There are a few ways to do this. The SSIS Pivot Transformation task will work...
September 9, 2013 at 4:11 pm
Erland's article, "The Curse and Blessings of Dynamic SQL" (the link that OTF inlcuded) is the best I have ever read about DSQL.
Itzek Ben Gan's Microsoft® SQL Server 2012...
September 6, 2013 at 2:52 pm
I took what Sean put together and added a little more sample data (a second order number) and changed it up a little. If I am correct you need the...
September 6, 2013 at 12:56 pm
Based on what I think you may be looking for I came up with:
WITH ddl_next_time_please(order_number, location, stop_type, stop_datetime, col) AS
(SELECT 1303927,'Whouse1 PUP',4394903,'2013-08-11 07:26:33.000',1UNION ALL
SELECT 1303927,'Store1 DRP',4394904,'2013-08-11 08:31:46.000', 2UNION ALL
SELECT...
September 6, 2013 at 12:25 pm
I also love Paul's articles on APPLY and would second that suggestion. If you own or have access to Microsoft SQL Server 2012 High-Performance T-SQL functions by Itzek Ben-Gen there...
August 30, 2013 at 10:38 am
Sean Lange (8/29/2013)
Alan.B (8/29/2013)
August 29, 2013 at 1:15 pm
I am not recommending that you use this but query, I am posting it for reference. It will produce the same result and it's easier to read & understand.
DECLARE @listStr...
August 29, 2013 at 1:05 pm
The correct way to split a string using T-SQL would be to use Jeff's splitter as Louis mentioned. That said, what you are doing is quite simple; you could do...
August 29, 2013 at 12:31 pm
Also,
I'd get rid of those NOLOCK table hints. NOLOCK (READ UNCOMMITTED) is for when you don't care if you always get the right answer. Here's a good article about that:
August 29, 2013 at 11:57 am
The error you are getting is true: GROUP BY/HAVING,etc are not allowed in the recursive part of a CTE. It does not look like you are trying to do a...
August 29, 2013 at 11:50 am
Viewing 15 posts - 2,131 through 2,145 (of 2,458 total)