Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • RE: Quickly Moving Databases

    THIS STATEMENT IS NOT TRUE: "You should note that you cannot re-attach more than 16 files for a single database"

    I regularly attach our databases that are 4TB in size...

  • RE: Quickly Moving Databases

    This statement is in correct:

    "You should note that you cannot re-attach more than 16 files for a single database."

    I routinely re-attach databases with 25 files.

  • RE: Consolidate multiple files

    This is a nice .vbs that I use:

    ____________________________________________________________________________________

    Const OpenAsASCII      =  0

    Const OverwriteIfExist = -1

    Set oFSO = CreateObject("Scripting.FileSystemObject")

    sResultFile = "e:\merge.txt"  ' any existing file will be overwritten!

    sSourceFolder = "e:\test"

    Set oFolder =...

  • RE: Parsing the name field with T-SQL

    I hope Yukon will offer more.  This seems like it would be a common problem.

  • RE: Parsing the name field with T-SQL

    Thanks for the links.  I will check them out.  I got a script from SQLTeam that works:

     

    Select

    [LName] =

    case

    when charindex(' ', Col001) = 0 then Col001

    Else...

  • RE: Parsing the name field with T-SQL

    Sorry.  I guess the code tags did not work.  By the way, the last record has 5 elements.

  • RE: Parsing the name field with T-SQL

    SELECT

     Column1 =

      CASE

       WHEN PARSENAME(REPLACE(Col001, ' ', '.'), 4) IS NULL AND PARSENAME(REPLACE(Col001, ' ', '.'), 3) IS NULL THEN PARSENAME(REPLACE(Col001, ' ', '.'), 2)

       WHEN PARSENAME(REPLACE(Col001, ' ', '.'), 4)...

  • RE: Parsing the name field with T-SQL

    SELECT

     LName =

      CASE

       WHEN PARSENAME(REPLACE(Col001, ' ', '.'), 3)

       IS NULL THEN PARSENAME(REPLACE(Col001, ' ', '.'), 2)

       ELSE PARSENAME(REPLACE(Col001, ' ', '.'), 3)

      END,

     FName =

      CASE

       WHEN PARSENAME(REPLACE(Col001, ' ', '.'),...

  • RE: Parsing the name field with T-SQL

    Thanks!  This seems to work also for the LName but I may be making this harder than it is:

    SELECT SUBSTRING(Col001,1,LEN(SUBSTRING(Col001,1,CHARINDEX(' ',Col001)))) AS LName FROM table

  • RE: Parsing the name field with T-SQL

    Yes.  I do alot of my data scrubbing in Excel but Excel is limited to 65,000 lines.  I need to do a couple of million records.

  • RE: Parsing the name field with T-SQL

    Raw Data

    Col001

    AABY TAMARA J

    AADNESEN MARJORIE

    AARANT MAUREEN R

    AARON MICHELLEE

    AARON PATRICIA J

    ABBA DAVID W

    ABBATE ANTHONY P

    SELECT SUBSTRING(Col001,1,CHARINDEX(' ',Col001)) AS LName,

    SUBSTRING(Col001,CHARINDEX(' ',Col001)+1, CHARINDEX(' ',Col001,CHARINDEX(' ',Col001)+1)-CHARINDEX(' ',Col001)+20) AS FName,

    REVERSE(SUBSTRING(REVERSE(Col001),1,CHARINDEX('',REVERSE(Col001)))) AS MName

    FROM table

    Gives...

  • RE: Parsing the name field with T-SQL

    Yes.  I have found a few UDF that will split the field but I need something like this:

    SELECT SUBSTRING(Col001,1,CHARINDEX(' ',Col001)) AS LName,

    SUBSTRING(Col001,CHARINDEX(' ',Col001)+1, CHARINDEX(' ',Col001,CHARINDEX(' ',Col001)+1)-CHARINDEX(' ',Col001)+20) AS FName,...

  • RE: Data Scrubbing

    Thanks Frank, David for the suggestions!

Viewing 15 posts - 1 through 15 (of 17 total)