user defined function

  • The function actually works if i run the query, but its highlighted in red in the query window of management studio

    'cannot find either column 'dbo' or the user defined function or aggregate 'dbo.fn_ParseNumChars', or the name is ambiguous.

    How can this function be improved ? any suggestions ?

  • mwwheeler (3/3/2011)


    The function actually works if i run the query, but its highlighted in red in the query window of management studio 'cannot find either column 'dbo' or the user defined function or aggregate 'dbo.fn_ParseNumChars', or the name is ambiguous. How can this function be improved ? any suggestions ?

    Can you post the exact SELECT statement that causes the error please?

  • SQLkiwi (3/3/2011)


    mwwheeler (3/3/2011)


    The function actually works if i run the query, but its highlighted in red in the query window of management studio 'cannot find either column 'dbo' or the user defined function or aggregate 'dbo.fn_ParseNumChars', or the name is ambiguous. How can this function be improved ? any suggestions ?

    Can you post the exact SELECT statement that causes the error please?

    Good luck. I've been asking for that from the beginning.

  • mwwheeler (2/28/2011)


    I basically wanted to use this function to make sure the contents can be safely converted to an integer and not cause an exception (if it contained a word). Is there a more efficient/safer way to do this ?

    There certainly is. Please see the following article...

    http://www.sqlservercentral.com/articles/IsNumeric/71512/

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply