Forum Replies Created

Viewing 15 posts - 391 through 405 (of 7,613 total)

  • Reply To: TSQL Question

    dup, removed

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: TSQL Question

    Update T --<<-- *must* use T here (the alias and NOT the table name) to be safe
    SET ACTIVE=CASE WHEN S.user IS NULL THEN 'N' ELSE 'Y' END
    FROM...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Performance related issue in the report after adding new table in the sp .

    (1) Cluster the "FF" table on ( FileDate, ISIN ) (if it's not already clustered that way).

    (2) Some of the JOIN conditions are out of place.  Change this code:

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Server memory question

    Not enough info provided for us to be able to say.  (1) Is SQL indicating that it's short of memory?  (2) How large are  your databases? (3) How many simultaneous...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Multicolumn indexes and fragmentation

    It's likely the fragmentation is having some effect on overall performance by causing some small additional I/O.

    To clarify, for a single keyed lookup, the index performance is not affected at...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Join on Column A when Column B is Null

    Select * from Table T1

    JOIN TableT2 on (T1.A IS NOT NULL AND T1.A =T2.A) OR (T1.A IS NULL AND T1.B = T2.B)

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: NVARCHAR(MAX) to VARCHAR(MAX)

    Super Cat wrote:

    Also how do I check if the table has had any options set for SP_TABLEOPTIONS such as 'LARGE VALUE TYPES OUT OF ROW'. I doubt this would be the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: NVARCHAR(MAX) to VARCHAR(MAX)

    When you ALTER a column, SQL creates a new column to store the data, it doesn't re-use the existing space for the new column.  You'll need to do some type...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    Jeff Moden wrote:

    ScottPletcher wrote:

    My other feeling was that having it run multiple times (2, 3, 4?) at the start of the month could be deceptive / confusing to people looking at...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    Jonathan AC Roberts wrote:

    ScottPletcher wrote:

    @jonathan-2:

    This method of determining Tuesday:

    DATEPART(weekday, @CurrentDate) = 3

    requires a specific DATEFIRST setting to work correctly.  Many business have locations around the world, so it's safer to use a...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    Fair enough.

    In that case, let's create a view that has the merged tables for anyone to use.  That is much cleaner.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    Yikes, if a developer can't join/merge two tables with distinct date values to a combined table, they need additional training, and pronto.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    Personally I prefer a nonworkdays-only table (I don't call it a "holiday" table because sometimes it's a nonwork day but not a holiday (such as for a power outage, etc.)).

    That...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    <removed, dup comment>

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Run Stored Procedure on the first Monday if each month of Tues if Mon Holiday

    @jonathan-2:

    This method of determining Tuesday:

    DATEPART(weekday, @CurrentDate) = 3

    requires a specific DATEFIRST setting to work correctly.  Many business have locations around the world, so it's safer to use a method that...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Viewing 15 posts - 391 through 405 (of 7,613 total)