Forum Replies Created

Viewing 15 posts - 3,241 through 3,255 (of 7,619 total)

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

  • RE: Index - Whether or not my table should have one

    Non-clustered index(es) are almost always a waste of resources on a staging table.  

    A clustered index is much more likely to be useful, although it's obviously not guaranteed 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".

  • RE: How to execute sql agent job using wildcard?

    Lynn Pettis - Friday, July 27, 2018 10:50 AM

    ScottPletcher - Friday, July 27, 2018 10:24 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 execute sql agent job using wildcard?

    You don't really need a cursor for what you're described.


    DECLARE @job_name_pattern nvarchar(128)
    DECLARE @sql nvarchar(max)

    SET @job_name_pattern = 'MyJobEvery%'

    SELECT @sql = CAST((

    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: Table Redesign Question

    sgmunson - Wednesday, July 25, 2018 11:55 AM

    Have to agree with Scott on the use of an identifier (int value) for 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: Can I pull DISTINCT customers with SQL based on most recent row record only?


    set statistics io,time off

    DROP TABLE latestrecords ;
    GO
    CREATE TABLE latestrecords
    (
    Id int,
    Email varchar(200),
    Customer_FirstName varchar(200),
    Status varchar(200),
    RecordTimestamp DATETIME
    )
    GO

    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: Can I pull DISTINCT customers with SQL based on most recent row record only?

    drew.allen - Tuesday, July 24, 2018 12:48 PM

    I don't have time to work on this right now, but I think that 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: Can I pull DISTINCT customers with SQL based on most recent row record only?

    Jonathan AC Roberts - Tuesday, July 24, 2018 12:24 PM

    ScottPletcher - Tuesday, July 24, 2018 12:15 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: Can I pull DISTINCT customers with SQL based on most recent row record only?

    Lynn Pettis - Tuesday, July 24, 2018 11:56 AM

    ScottPletcher - Tuesday, July 24, 2018 11:44 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: Can I pull DISTINCT customers with SQL based on most recent row record only?

    Lynn Pettis - Tuesday, July 24, 2018 11:38 AM

    ScottPletcher - Tuesday, July 24, 2018 11:32 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".

Viewing 15 posts - 3,241 through 3,255 (of 7,619 total)