The multi-part identifier ERROR

  • Hi, i want to write a function which do some calculate something in database. i write it but i am getting following Error

    The multi-part identifier "dbo.functionname" could not be bound.

    then i write simple function like below but same error

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    ALTER FUNCTION [dbo].[t1] (@tname1 varchar(50))

    RETURNS varchar(50)

    AS

    BEGIN

    return 'aa'

    END

    --select dbo.t1 'a'

    ERROR :

    Msg 4104, Level 16, State 1, Line 1

    The multi-part identifier "dbo.t1" could not be bound.

    WHY ? there is nothing in this function.

  • You have to CREATE the function before you can ALTER it.


  • i have already created function and then i altered it

  • You are calling the function wrongly. Try this:

    select dbo.t1('test')


Viewing 4 posts - 1 through 4 (of 4 total)

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