Forum Replies Created

Viewing 15 posts - 571 through 585 (of 7,619 total)

  • Reply To: Parsing Stored Procedures for Table Dependencies

    Maybe just scan the procedure text for "~TRUNCATE TABLE~" (where ~ is not A-Z0-9$_@).  Then parse out the next word from the text to get the table name.

    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: Job History says running, but Job Activity says idle

    Again, are you only looking at history for the current instance_id value?

    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: Job History says running, but Job Activity says idle

    webrunner wrote:

    ScottPletcher wrote:

    What do you mean "the job history says the job is running."  The jobhistory never shows that, it only show the past history.

    Be sure to verify the instance_id. ...

    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: Job History says running, but Job Activity says idle

    What do you mean "the job history says the job is running."  The jobhistory never shows that, it only show the past history.

    Be sure to verify the instance_id.  If 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: ISNULL in case statement

    ISNULL/COALESCE is not as clear as explicitly checking for NULL:

    SELECT COL1,
    CASE WHEN Table1.COL2 = 0 then 'ZERO'
    WHEN Table1.COL2 = 1 OR Table1.Col2 IS NULL then 'ONE'
    ELSE ''...

    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: Can log backups cause Operating system error 32?

    No, database and/or log backups would not cause this error.

    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: Return 80 % match

    SELECT VendorName
    FROM VenInfo
    GROUP BY VendorName
    HAVING SUM(CASE WHEN VenSN = 'Y' THEN 1 ELSE 0 END) * 100.0 / SUM(1) >= 80

    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: Generation of Auto Series based on logic

    Nor trying to be difficult, but that just lists the values, it doesn't assign them as the table ID in the existing table, as stated in the OP.

    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: Create a Job Schedule that runs on the 1st of month only if it falls on a Sunday

    You could schedule a job to run on the first of the month, but immediately exit the job if that day is a Sunday.  Add a second sched to 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: Best primarykey and index

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    To be absolutely clear, you want a:

    2) unique clustered [index] on (tenant,year,id)

    And if you partition the data (which typically wouldn't be necessary here), partition it by...

    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: Trouble with date values

    Jeffrey Williams wrote:

    ScottPletcher wrote:

    You can, and definitely should, get rid of the other ISNULLs in your WHERE:

    AND ISNULL(d.value_2,'') NOT IN ('Clay','Volusia') --replace with -->  AND d.value_2 NOT IN ('Clay','Volusia')

    AND ISNULL(rc.referral_category_ud,'') <>...

    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: Trouble with date values

    You can, and definitely should, get rid of the other ISNULLs in your WHERE:

    AND ISNULL(d.value_2,'') NOT IN ('Clay','Volusia') --replace with

    -->  AND d.value_2 NOT IN ('Clay','Volusia')

    AND ISNULL(rc.referral_category_ud,'') <> 'FFS_NO_TAKE_BAC' --replace with

    -->...

    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: Best primarykey and index

    Jeff Moden wrote:

    ScottPletcher wrote:

    To be absolutely clear, you want a:

    2) unique clustered [index] on (tenant,year,id)

    And if you partition the data (which typically wouldn't be necessary here), partition it by (tenant, year)...

    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: Split One Column into Multiple that uses / as the delimiter

    It is.  Google for function "dbo.DelimitedSplit8K".  It's a function you install once and can use from then on for 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: Best primarykey and index

    To be absolutely clear, you want a:

    2) unique clustered [index] on (tenant,year,id)

    And if you partition the data (which typically wouldn't be necessary here), partition it by (tenant, year) not just...

    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 - 571 through 585 (of 7,619 total)