Forum Replies Created

Viewing 15 posts - 241 through 255 (of 325 total)

  • RE: The Age of Multiple Databases

    I try to be open about options, if there is a better solution to a problem than "just put it in SQL Server" then it is worth exploring. You do...

  • RE: Why QUOTENAME is important

    Using QUOTENAME around table names, schema name etc is a completely sound a sensible practice that should definitely be encouraged. I'll fully admit to being guilty of the '['+@tablename+']' myself...
  • RE: hashbytes

    I think he's planning on using hashing as a way of check-summing data, not as some sort of budget encryption, which is an entirely apt use. You're right about MD5...

  • RE: parsing log data

    Sure. The string_split is just breaking up the text into individual rows based on the newline character (this wouldn't be necessary if you were reading in the data via bulk...
  • RE: parsing log data

    Each row appears to be a JSON fragment, so you can just do:
    Declare @log varchar(max) ='{ "Name": "David", "Gender": "Male", "Address": "125 Gambler Lane" }
    { "Address":...
  • RE: Jobs running indefinitely

    Do you have the max memory setting configured in SQL Server and leaving a reasonable portion of the RAM for processes other than SQL Server? One possibility is that your...

  • RE: Standard Deviation (variance) using columns in same row.

    tshad - Wednesday, August 1, 2018 11:44 AM

    Then the value is accessed by f.Average.  I had never seen it used that way.  I...

  • RE: Is SQL Server Mature?

    I'm currently in the middle of a migration for 2005 to 2017 and the difference in what can be achieved in a shorter timescale is night and day. Not having...

  • RE: HELP,TSQL, - How do I write the SELECT stmt to condense multiple time spans

    Here's my take on it:
    If object_id('tempdb..#DLT') IS NOT NULL DROP TABLE #DLT;
    CREATE TABLE #DLT( emp VARCHAR(13), St VARCHAR(8), Et VARCHAR(8), RSN VARCHAR(100) );
    INSERT INTO #DLT(...
  • RE: Find the second occurrence in the string

    Drop Table If Exists #Temp
    Create Table #Temp
    (
     Code VarChar(20)
    )

    Insert Into #Temp(Code)
    Values
    ('C1588-27-3'),
    ('C1588-28-3'),
    ('C1588-29-8')

    Select Code, SubString(Code, 2, SecondHypen -...

  • RE: Joining dates to calculate payment month dates

    Something like:
    Drop Table If Exists #Temp
    Create Table #Temp
    (
     Id int identity(1,1),
     StartDate Date Not Null,
     MonthZeroStart As Case
      When DatePart(Day, StartDate) < 15 Then StartDate
  • RE: hashbytes

    In #1 you are hashing the NVarChar string "<foo name="hello"/>"
    In #2 you are hashing the NVarChar string "hello"
    In #3 you are hashing the VarChar string "hello"

    These...

  • RE: How to get a record if any of it's column values is set to true ?

    I'd do it with bitwise arithmetic:


    Select

    August 2, 2018 at 12:16 pm

    #2000048

  • RE: How to set the primary key for each table

    Make sure you're in the right database first, by putting:

    Use MyDatabaseName
    Go

    At the top of the file (replacing MyDatabaseName with the name of...

  • RE: Unused space; shrink or not shrink

    "Unused" space will be reused again as new data is added and the datafile won't grow until that space has been used up, so unless disk space becomes an enormous...

Viewing 15 posts - 241 through 255 (of 325 total)