Forum Replies Created

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

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

  • Reply To: Finding columns with null values

    I asked because many people are happy with code as long as it ultimately does what they need it to do, i.e. "the code's good enough for me."  In 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: Finding columns with null values

    Jeff Moden wrote:

    ScottPletcher wrote:

    Btw, why are you using such an inefficient method, checking the column values one by one?

    What are you asking why instead of posting a link to...

    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:

    astrid 69000 wrote:

    Hi,

    I get the object id, it stopped working when I updated the management studio, i think it is not the code, but rather a new thing...

    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

    Btw, why are you using such an inefficient method, checking the column values one by 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: T-SQL code help

    jcelko212 32090 wrote:

    Please do some research and look up the E you rules for triangulation. This means that you have to convert from currency A to Euros, then from Euros to currency...

    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

    Is it possible that OPERATION is a view (or synonym) and not a table?

    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,613 total)