Forum Replies Created

Viewing 15 posts - 4,426 through 4,440 (of 7,614 total)

  • RE: Truncation errors

    In theory you could:

    SET ANSI_WARNINGS OFF

    But read up very, very carefully on that before you do it!

    Or, you could create a stored proc and pass the values into the proc...

  • RE: Sub query where clause returns nothing

    Yes.

    The first query only considers rows where [LotJob] = '0000337495'.

    The second first gets the max LotJob and then that max value must be = '0000337495' for the row...

  • RE: Question on parameters and minusing numbers

    Hugo Kornelis (2/16/2016)


    ScottPletcher (2/16/2016)


    Get rid of the dashes (-) in the date, they introduce errors (ambiguity).

    Use format 'YYYYMMDD [hh:mm:ss]', which is always interpreted correctly, regardless of language/date settings.

    Sorry, but that...

  • RE: Improving Performance

    Sounds like a good way to get yet more of the dreaded:

    String or binary data would be truncated.

    error. MS, seriously, you can't tell us which column had the error??...

  • RE: stored procedure for disabling then enabling indexes

    These are unlikely, but let's:

    1) add brackets around the db name, just in case.

    2) specify a 'dbo' schema for the table name, just in case. It's easy to accidentally...

  • RE: Question on parameters and minusing numbers

    Get rid of the dashes (-) in the date, they introduce errors (ambiguity).

    Use format 'YYYYMMDD [hh:mm:ss]', which is always interpreted correctly, regardless of language/date settings.

    declare @CLUSTER_CODE as nvarchar(3)

    declare@START_MONTH as nvarchar(2)

    declare@START_YEAR...

  • RE: Missing Stats like Missing Indexes

    For statistics, I'd do what DTA said. For indexes, definitely not, all DTA index recommendations should be thoroughly reviewed before creating/implementing. But for stats, if SQL "says" it...

  • RE: Maximum Identity Value Reached

    Sorry, don't have much time but here's a quick overview of one method to consider:

    1) create another table with the new bigint data type to copy the existing data to...

  • RE: Identify procs referencing user-defined table type

    I would think sys.sql_expression_dependencies would contain those references, since a table-type is in sys.objects, type = 'tt'.

  • RE: Trigger issue committing data

    ALTER TRIGGER [dbo].[BadUpdate]

    ON [dbo].[SomeTable]

    INSTEAD OF UPDATE

    AS

    SET NOCOUNT ON

    IF EXISTS (

    SELECT 1

    FROM dbo.Foo

    ...

  • RE: TVF suddenly slow

    Rather than being "stuck" on tuning, why not take this as an opportunity to possibly tune the query overall and post the code? Perhaps it can be reduced below...

  • RE: Change column smallint to int 300 million records

    If you create a new column, and copy existing data to that column, you don't have to UPDATE every row in a single transaction. And you don't have to...

  • RE: Change column smallint to int 300 million records

    So the entire 460GB is in the main part of the table, none in overflow space? Often with a row that wide you'd be able to offload a decent...

  • RE: Convert date to MMDDYYYY

    Yeah, should be good, except that I'd use varchar instead of char so that you don't have trailing spaces after the /s are replaced.

  • RE: Change column smallint to int 300 million records

    Sergiy (2/9/2016)


    ScottPletcher (2/9/2016)


    Absurd to make a blanket claim about "every page". Increasing from a smallint to a full int requires only 4 extra bytes per row (as I understand...

Viewing 15 posts - 4,426 through 4,440 (of 7,614 total)