Forum Replies Created

Viewing 15 posts - 1,636 through 1,650 (of 7,619 total)

  • Reply To: T-SQL code help

    Ooh, yeah, that is rough.  Sorry, it must be a royal pain (no pun intended).

    When I was a kid, my grandmother used to say, "Never get old."  As I got...

    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: Finding columns with null values

    The Dixie Flatline wrote:

    Perhaps.    I was just going by his language that says the columns contain nulls.     I don't think he ever used the words "all" or "only".

    I was...

    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: Deadlocks during concurrent delete operation

    You stated you're using stored procs.  If so, try using a bigint SEQUENCE rather than a guid.

    Also, it sounds like you insert multiple rows with the same guid/SEQUENCE.  If so,...

    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: Would this be a join?

    You're welcome!  Thanks for the feedback.

    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: Finding columns with null values

    I think the OP does want to find only columns that are all NULL.  Perhaps to remove the column?

    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: HEAP fragmentation percent is high

    Would you put your heap table name in the code below, run it, and post the results?  That will help determine which, if any, index is best for a clustering...

    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: Would this be a join?

    Yes, you could use a JOIN.

    SELECT IL.Item,ForecastDemandQty,ForecastDemandMAD,MinShelfQty,MaxShelfQty,
    QuantityOnHand,QuantityCommitted,QuantityAllocated,QuantityReleased,ExcludeFromDistraNet,
    ITH.TotalShipped

    FROM tblimItemLoc IL

    LEFT OUTER JOIN (
    SELECT Item,SUM(TxQty) AS 'TotalShipped'
    FROM IMInvTxHistory
    ...

    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: Bug = SQL hangs in plan creation for MAX(DATALENGTH(varbinmax))

    Jonathan AC Roberts wrote:

    How long does

    SELECT DATALENGTH(varbinmax_col1)
    FROM dbo.base_table

    take to run?

    Here's the TIME statistics for:

    SELECT TOP (200) DATALENGTH(varbinmax_col1)

    (200 rows affected)

    SQL Server Execution Times:

    CPU time = 16 ms, elapsed time...

    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: Database gets locked while copying tables from another Server

    Yeah, the SELECT ... INTO holds certain internal locks on system tables.

    Instead, create the table, the clus index (only), and only then load the data into it, like this:

    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: Implicit varchar to nvarchar conversion by linked server

    I would think using the EXEC ... AT method, should get around that.  Try that:

    EXEC('SELECT ... FROM dbname.dbo.table_name ... WHERE ...') AT [RemoteServer]

    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: Stored Procs Wrapped in Stored Procs

    n/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: Stored Procs Wrapped in Stored Procs

    alex.sqldba wrote:

    Evening Guys,

    (1) Are there negative effects of having multiple stored procs wrapped in an outer/master proc?

    (2) Will the inner procs that are executed all be run as one...

    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: Finding columns with null values

    Jeff Moden wrote:

    Shifting gears to the code itself, it's pretty much a both a resource and performance nightmare.  It makes one full pass of either the CI or an NCI for...

    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: The most illustrative case for using EXTENDED EVENTS?

    Deadlocks would be one of the main ones, I would think.

    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: Finding columns with null values

    This query or one just like it seems to come up a lot.  But I still don't know if there's enough demand for, say, a full article on it.  It's...

    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 - 1,636 through 1,650 (of 7,619 total)