Forum Replies Created

Viewing 15 posts - 2,131 through 2,145 (of 2,458 total)

  • RE: What is the difference between sp_who2 and sp_whoisactive which one is better

    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...

  • RE: joining tables

    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...

  • RE: Index rebuild Maintenance Plan may not be running properly

    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...

  • RE: SSRS, how to logicaly combine related reports

    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...

  • RE: Integration Services (BIDS)

    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...

  • RE: dynamic sql query?/

    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...

  • RE: Query help

    It seams to be working correctly for me as well...

  • RE: subtract mutlple rows from top row value

    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...

  • RE: subtract mutlple rows from top row value

    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...

  • RE: Cross Apply in Sql

    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...

  • RE: How to Split String

    Sean Lange (8/29/2013)


    Alan.B (8/29/2013)


    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;...

  • RE: Help On Query

    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...

  • RE: How to Split String

    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...

  • RE: Help with this query please.

    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:

    SQL...

  • RE: Help with this query please.

    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...

Viewing 15 posts - 2,131 through 2,145 (of 2,458 total)