Forum Replies Created

Viewing 15 posts - 706 through 720 (of 819 total)

  • RE: More Triggers

    I prefer multiple triggers. But, it's easier to fall in recursive triggers.

  • RE: More of computed columns

    To get values from other tables or columns of the same table but different row, you should use a function:

    CREATE TABLE [dbo].[a2]

    (

    [a1ID] [int] NULL,

    [col3] AS (a1ID^2)

    )

    GO

    create function get_a2_col3(@a1id int)

    returns int

    as

    begin

    ...

  • RE: Database Snapshot

    Maybe an attempt to introduce trinary logic? Or should the third option have been NULL? 😉

    Please, do not start a discussion about NULLs. 😀

  • RE: Database Snapshot

    Hugo Kornelis (11/9/2010)


    Nice, easy question.

    I was wondering about the inclusion of the "none of the above" option. Was this just a joke from the question author, or will people actually...

  • RE: Predict the total count

    Don't forget Mayan calendar! Some two years to go, and ...

    😀

    I agree! :-D:-D:-D

  • RE: Predict the total count

    So when the conversion into floats and then taking ceiling of the values, these 2 records generate the same values.

    I disagree with explanation, it's enough to convert to INT

    Select...

  • RE: A Faster BETWEEN Dates

    Hello, terrance

    May you explain this syntax?

    I think it is very dangerous to transfer search condition in the WHERE clause,

    because you can alter result of "LEFT JOIN" that becomes a pure...

  • RE: Incremental additions

    I think the question author tried to confuse us with the syntax for compound operators

    I think the question author CONFUSED himself with the syntax for compound operators, as you...

  • RE: Incremental additions

    So it seems that the explanation of the question is wrong, as it states that the pre-increment operator is not used in SQL Server. SQL Server uses however a compound...

  • RE: Output of Query

    -- non standard ansi

    SELECT NullableColumn FROM NullOperation WHERE ISNULL(NullableColumn,'') <> '1'

    OR

    -- standard ansi

    SELECT NullableColumn FROM NullOperation WHERE COALESCE(NullableColumn,'') <> '1'

  • RE: SQL Server 2008 R2

    Hugo Kornelis (10/22/2010)


    I got it wrong. I blame my total lack of interest in the R2 release.

    But a quick question - if Multi-Server Administration was a new feature in SQL...

  • RE: Color coding

    Thanks Hugo.

    I work with SSMS sql2500, too.

  • RE: Color coding

    I answered TRUE, but reading and re-reading both question and answer, I do not understand why it's false. Please Hugo, help us to understand.

  • RE: Computed Column Divide by Zero?

    Be aware of computed columns that use complex formula or call functions, they may lead to performance problems:

    create function getsum(@id int)

    returns int

    as

    begin

    return (select sum(id) from sysobjects...

  • RE: Computed Column Divide by Zero?

    henrik staun poulsen (10/13/2010)


    In order to get round the divide by zero error, I generally do this:

    PF1 AS QF1 / nullif((QF1 + QF2),0),

    instead of

    PF1 AS QF1 / (QF1 + QF2),

    Good....

Viewing 15 posts - 706 through 720 (of 819 total)