Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Location
    China
    Posts
    54

    Question Unanswered: Create new Function... "Invalid Object Name"

    Hi,

    I am new to MS SQL Server and am using MS SQL Server 2008 Express with SQL Server Management Studio.

    A company has given me a database and I want to add some new functions. The problem is I can't figure out how to save them to the server.

    I have done the following:
    - open object explorer > databases > nanjing > programmability > functions > scalar-valued functions
    - right click and select "new scalar-valued function"
    - I have posted in the code I want (copied from another function with some amendments)
    - I have then tried "save" and "save as" which creates a locally readable .sql file. I call it "dba.EALname"
    - I then have tried to "execute" hoping it would somehow import the "saved" function during the process.

    It then outputs a message at the bottom of the function viewer window saying:
    ----------------------------------
    Msg 208, Level 16, State 6, Procedure dba.EALname, Line 1
    Invalid Object name 'dba.EALname'.
    ----------------------------------

    I am sure this is a really simple newbie problem... any help appreciated.

  2. #2
    Join Date
    Apr 2003
    Location
    China
    Posts
    54
    Scratch that... I am told that using "Express" won't allow me to add functions.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Unless you've created a schema named dba, which I really doubt what you ought to use is [dbo].[EALname] which I think will work.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    pretty sure express sku does allow udfs.

Posting Permissions

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