Forum Replies Created

Viewing 15 posts - 7,066 through 7,080 (of 7,608 total)

  • RE: pages

    Depends on how many bytes in table, and how long a row is.

    A SQL page is 8K, with 8060 total bytes available for data. Each row resides on a...

  • RE: Find all columns that might contain SSN numbers

    I'd wait to check numeric columns, because it's gonna be even more difficult to determine if the values are SSNs.

    As to [n][var]char, you do have some restrictions that help:

    1) column...

  • RE: Shrink database after archiving

    capnhector (11/26/2012)


    ScottPletcher (11/26/2012)


    Of course don't rebuild needlessly; check the stats and only rebuild those indexes that require it.

    Also, with a reasonably well-tuned tempdb, you should strongly consider using the:

    SORT_IN_TEMPDB =...

  • RE: Backup Overwrite

    Is the backup in a "safe" location, such as a SAN drive, that can survive if the server itself fails?

    If not, you need to copy the backup to an alternate...

  • RE: How to join multiple rows of subtable to parent table

    haagendaz (11/26/2012)


    I have 2 related tables and the second table can have many rows associated with the parent table. I need to join all of rows in table 2 to...

  • RE: Shrink database after archiving

    Of course don't rebuild needlessly; check the stats and only rebuild those indexes that require it.

    Also, with a reasonably well-tuned tempdb, you should strongly consider using the:

    SORT_IN_TEMPDB = ON

    option. ...

  • RE: LIKE with and without wildcards in WHERE clause

    pdanes (11/26/2012)


    DiverKas (11/26/2012)


    But wouldn't this always compare all variables, though? In the syntax with OR, the query engine can see that a variable is empty, thereby satisfying one side of...

  • RE: How to do a full copy of a database onto the same server with a different name

    You want to use a T-SQL script to do the backup and restore, not go thru the GUI. That will speed up and simplify future repeats of the same...

  • RE: switching address with Subtring & len funtion

    Yes, my initial concern wasn't with performance per se but with readability/understandability.

    Since PARSENAME is available, fully tested and documented already, I would use it in preference to hand-coded SUBSTRING,...

  • RE: switching address with Subtring & len funtion

    Eugene Elutin (11/20/2012)

    After a bit of testing, I can confirm that PARSENAME does win much more often over use of CHARINDEX with SUBSTRING's than other way around.

    (Will keep this...

  • RE: switching address with Subtring & len funtion

    Eugene Elutin (11/20/2012)


    ScottPletcher (11/20/2012)


    select PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' + PARSENAME(left(email, charindex('@', email) - 1), 2) +

    substring(email, charindex('@', email), len(email))

    from (

    ...

  • RE: switching address with Subtring & len funtion

    select

    PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' +

    PARSENAME(left(email, charindex('@', email) - 1), 2) +

    substring(email, charindex('@',...

  • RE: Performance Issue

    SQL Server has frankly always had some internal issues with parallelizing queries. Parallelization is great for (re)building indexes, but for queries it's always had its quirks.

    Unless you are absolutely...

  • RE: Dependent Delete statements

    delete from #ExistingBackups

    where

    (Name not like '%master%' and Name not like '%model%' and Name not like '%msdb%') or

    (ISNUMERIC(Right(SUBSTRING(name,1,charindex('.',name)-1),8))=0) or

    ...

  • RE: Grant execute on all Stored Procedures in specific DB's?

    ahthomas (11/19/2012)


    How do I grant (in the quickest simplest way) execute on all stored proc's in a database? I have a few to do this to, but not all on...

Viewing 15 posts - 7,066 through 7,080 (of 7,608 total)