Forum Replies Created

Viewing 15 posts - 3,226 through 3,240 (of 7,613 total)

  • RE: Looking for an idea how to construct this T-SQL Select Statement

    drew.allen - Monday, August 13, 2018 8:27 AM

    andycadley - Sunday, August 12, 2018 5:18 AM

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

  • RE: Get session id/connection id that created global temp/temporary table

    I believe session_ids can be re-used, so getting a session_id wouldn't necessarily tell you anything.

    As noted, if you need to get that info, add a trigger to capture...

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

  • RE: split string into two columns

    jon.wilson - Friday, August 10, 2018 11:48 AM

    I'm looking to split a string into 2 columns. The first column will have...

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

  • RE: large volume test data - PK constraint

    Yes, for testing purposes, adding an identity to guarantee uniqueness should work just fine.

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

  • RE: Question on query to show DB names, status, recover model & backup size.

    Glen_A - Tuesday, August 7, 2018 11:22 AM

    I'm an Oracle DBA that used to work with MSSQL a few years ago, and...

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

  • RE: Delete and shrink data file

    After shrinks, I've had good luck very often with just a REORGANIZE overall ~80-85%, rebuild required ~15-20% of the time.  Start with the smaller tables first, moving up in size...

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

  • RE: how to one-way encode sensitive data for display?

    Eirikur Eiriksson - Monday, August 6, 2018 8:58 AM

    Jeff Moden - Monday, August 6, 2018 8:46 AM

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

  • RE: how to one-way encode sensitive data for display?

    Jeff Moden - Monday, August 6, 2018 8:00 AM

    ScottPletcher - Monday, August 6, 2018 7:43 AM

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

  • RE: how to one-way encode sensitive data for display?

    For storing of SSN, you might consider adding a check digit to the value, so that it does become 10 digits (or 11 or whatever).  That way they are trying...

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

  • RE: how to one-way encode sensitive data for display?

    autoexcrement - Friday, August 3, 2018 1:41 PM

    Yes, my concern with an incrementing, numeric, identity-type column is that I know it's generally...

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

  • RE: how to one-way encode sensitive data for display?

    You could use a SEQUENCE, or if that is not available, insert the SSN into table with an identity and use the identity value as a link back to 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".

  • RE: Find the second occurrence in the string


    Select Code, new_string
    FROM #Temp
    CROSS APPLY (
        SELECT STUFF(Code, 1, 1, '') AS base_string
    ) AS ca1
    CROSS APPLY (
        SELECT LEFT(base_string,...

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

  • RE: Using an ALIAS table name in a CASE statement

    Jason A. Long - Thursday, August 2, 2018 12:43 PM

    ScottPletcher - Thursday, August 2, 2018 12:11 PM

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

  • RE: Using an ALIAS table name in a CASE statement

    SELECT in the CROSS APPLY is more flexible, in that it makes it easier to assign multiple alias names and allows for table access to be part of assigning an...

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

  • RE: Find a value immediately prior to a given date

    Somewhat confusing, but I think this may return the rows you want:


    SELECT T.*, Z.*
    FROM
    #TEMP1 T
    INNER JOIN
    [TSI].[ZATS_BROKER_FEED] Z
    ON T.Part_Num...

    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 - 3,226 through 3,240 (of 7,613 total)