August 3, 2012 at 11:59 pm
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.
August 4, 2012 at 12:51 am
You have to CREATE the function before you can ALTER it.
August 4, 2012 at 3:02 am
i have already created function and then i altered it
August 4, 2012 at 6:54 am
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