Results 1 to 3 of 3

Thread: what is this error message?

  1. #1
    Join Date
    Jul 2006
    Posts
    29

    Question what is this error message in SQL server 2000? [ Invalid object name ]

    I am new to User Defined functions(UDF). I downloaded several UDF codes and compiled through Query Analyzer. After compilation whenever i tried to access the function some worked but most of the UDFs that return TABLE object shows error everytime.

    "Invalid Object Name"

    UDF codes I downloaded shud not have problem in coding since i have read so many comments on those codes saying they worked fine with others. Must be problem with my SQL version or what??. Only those UDFs that returns TABLE object show error when executing even they compile well.

    Can it be becuz I am not using any service packs?
    May be I am not doin' the rite thing? Can anyone suggest any idea?

    for eg:
    i have downloaded a split function code and i executed it in the following way in query analyzer

    select dbo.Splitstr('a^b^c','^')
    -it gives following error since it returns table

    ------------------------------------------
    Server: Msg 208, Level 16, State 1, Line 1
    Invalid object name 'dbo.Splitstr'.
    ------------------------------------------

    i have downloaded another UDF and ran it as follows.
    select dbo.Properstr('what is your name?')
    -it works fine since it returns string(varchar)

    - i am using SQL server 2000.

    Thanks a lot in advance!!
    Last edited by zathrone; 09-04-2006 at 10:21 AM. Reason: server with example

  2. #2
    Join Date
    Sep 2005
    Posts
    168
    Since UDF returns a table , you should "query" the function as a table....

    SELECT * FROM dbo.Splitstr('a^b^c','^')

    --HTH--
    Last edited by mikr0s; 09-04-2006 at 12:04 PM.

  3. #3
    Join Date
    Jul 2006
    Posts
    29

    thanks a lot

    Quote Originally Posted by mikr0s
    Since UDF returns a table , you should "query" the function as a table....

    SELECT * FROM dbo.Splitstr('a^b^c','^')

    --HTH--
    thanks a lot man...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •