Forum Replies Created

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

  • RE: Is Division by Zero NULL?

    (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 in...

  • RE: Is Division by Zero NULL?

    Thank you all.

  • RE: Is Division by Zero NULL?

    OK, ... let this post/thread be a lesson to all you "know-it-all" experts. Lessons learned:

    Not all UDF are bad, ... if correctly written, they can be tremendous for establishing and...

  • RE: Is Division by Zero NULL?

    Why we use a UDF instead of NullIf:

    It's very simple, ... standards and code control.

    Also, for those who have a really strong understanding of SQL, they will know that many...

  • RE: Is Division by Zero NULL?

    We don't want an error, because; if the divisor is zero, it means we merely haven't collected that data. In the example I gave, most obviously some homes do not...

  • RE: Is Division by Zero NULL?

    Our Function for Division:

    CREATE FUNCTION dbo.Divide(@Numerator Real, @Denominator Real)

    RETURNS Real AS

    /*

    Purpose: Handle Division by Zero errors

    Description: User Defined Scalar Function

    Parameter(s): @Numerator and @Denominator

    Test it:

    SELECT...

  • RE: Is Division by Zero NULL?

    I've taken about an hour this morning to review my company's stored procedures and other queries to review where our function "dbo.Divide(@Numerator Float, @Denominator Float)" is used. It seems that...

  • RE: Is Division by Zero NULL?

    from: Steve Jones - SSC Editor

    There have been a few people saying NULL is the absence of a value, which isn't what I've learned in database theory. This is a...

  • RE: Is Division by Zero NULL?

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

  • RE: Is Division by Zero NULL?

    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 of a...

  • RE: Is Division by Zero NULL?

    So that I can best understand the value you have described for the error message instead of returning NULL, please share with me a small block of code where such...

  • RE: Is Division by Zero NULL?

    if divide by zero is allowed, it's possible to prove that 1=2

    The above claim would only work in a logical proof if you identified that NULL= NULL . NULL !=...

  • RE: Is Division by Zero NULL?

    To both replies thus far:

    I beg to differ. The definition of "NULL" is a lack of a value. The definition of division by zero is a lack of ability to...

  • RE: Temporary Functions?

    The below is what I have used in the past to accomplish the need for a Scalar UDF in MS SQL:

    IF OBJECT_ID('tempdb..##fn_CORP_Divide') IS NOT NULL DROP PROCEDURE ##fn_CORP_Divide;

    CREATE PROCEDURE ##fn_CORP_Divide...

  • RE: Question of the Day for 20 Sep 2004

    CREATE TABLE #TestUpdateA (ColA Char(1),ColB Int)

    GO

    CREATE TABLE #TestUpdateB (ColA Char(1),ColB Int)

    GO

    INSERT INTO #TestUpdateA VALUES('A','0')

    GO

    INSERT INTO #TestUpdateA VALUES('B','0')

    GO

    INSERT INTO #TestUpdateA VALUES('C','0')

    GO

    INSERT INTO #TestUpdateB VALUES('A','1')

    GO

    INSERT INTO #TestUpdateB VALUES('A','2')

    GO

    INSERT INTO #TestUpdateB VALUES('B','1')

    GO

    INSERT...

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