Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 6,036 total)

  • RE: is there a way to select column data for columns with an ordinal position < a particular ordinal position?

    Actually, that table is already created for you by the nice (shoosh you there! :-)) guys from MS:

    declare @maxordinal int

    select @maxordinal = column_id - 1

    from sys.columns

    WHERE OBJECT_ID = OBJECT_ID('mytable')

    AND name...

  • RE: Is Division by Zero NULL?

    CELKO (9/13/2016)


    (start_date, end_date) pairs the idiom has been that a null in the end_date means "eternity"in that context

    My experience has been that it means one of two possible outcomes:

    1) Eternity...

  • RE: Is Division by Zero NULL?

    Gregory Hart (9/13/2016)


    (start_date, end_date) pairs the idiom has been that a null in the end_date means "eternity"in that context

    My experience has been that it means one of two possible outcomes:

    1)...

  • RE: delete millions of rows

    The Dixie Flatline (9/10/2016)


    I'll admit the loop is going to run a long time, but you don't have to worry about missing a constraint, nonclustered index, foreign key, etc. ...

  • RE: Is there any way to "mute" msdb backup entries?

    sql-lover (9/8/2016)


    Is there any trace flag or way to avoid successful backups being logged into msdb system databases? Please keep in mind I am talking about msdb, not SQL error...

  • RE: Adding Leading Zeros to Integer datatype

    FORMAT or CONVERT or STR - they all return varchar data type.

    On an attempt to save their outcome into int column it will be converted back to int and all...

  • RE: Query Performance help needed

    For a start.

    You do not need to run the same query twice:

    SELECT @Count=count(*) from dbo.PropertyAssets pa

    inner join Scenarios sce on sce.id = pa.scenarioId

    inner join Portfolios por on por.id...

  • RE: Is Division by Zero NULL?

    Gregory Hart (9/8/2016)


    For most business data management applications, the preference is to default numeric values to be zero and not allow NULLs.

    It must be "For lousy developers of...

  • RE: Is Division by Zero NULL?

    mister.magoo (9/8/2016)


    But, if you have to add division by zero handling to overcome this problem, why not have a standardised, optional, internal way of returning some kind of value from...

  • RE: Is Division by Zero NULL?

    mister.magoo (9/8/2016)


    Sergiy (9/7/2016)


    mister.magoo (9/7/2016)


    If I need to handle things differently when the value is zero (I don't want to return NULL), I end up with a CASE statement such as...

  • RE: Is Division by Zero NULL?

    mister.magoo (9/7/2016)


    If I need to handle things differently when the value is zero (I don't want to return NULL), I end up with a CASE statement such as

    CASE cost...

  • RE: Is Division by Zero NULL?

    Gregory Hart (9/7/2016)


    OK, ... Pray tell, ... What possible use have you had for a raised error when division by zero occurs?

    Same use as for any other type of errors...

  • RE: Add columns to multiple tables

    tshad (9/7/2016)


    I have these columns on all my tables. It also helps in debugging. I can quickly find out when the record was last touched without having to...

  • RE: Is Division by Zero NULL?

    Gregory Hart (9/7/2016)


    I guess my point with this matter is that in 22+ years of database development, I personally have never had a need for returning an error message instead...

  • RE: Indexing - Should primary key be a natural key or an identity?

    Again, there are certainly times when a shorter clustering key and more covering indexes are warranted. But not by default. In fact, that should never be by default.

    I wish...

Viewing 15 posts - 1,171 through 1,185 (of 6,036 total)