SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


function erroring and reporting wrong name


function erroring and reporting wrong name

Author
Message
block 5753
block 5753
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 26
Hi All,

I have a weird one for you that I was hoping to get some help with.

I created and deleted a few functions.

Then I created a new one (Called RAT)

When I call it with SELECT dbo.rat(@param,@param) it comes back with a

"Cannot find either column "dbo" or the user-defined function or aggregate "dbo.RCHARINDEX", or the name is ambiguous."

Now, there used to be a function called RCHARINDEX, but its gone, and it doesnt come up in the list of functions.....

I deleted it because for some reason I couldnt call it, but another function in the list worked fine, so its possibly a compounded problem,

When I run

select 1 from dbo.sysobjects where id = object_id('[dbo].[RAT]')
select 1 from dbo.sysobjects where id = object_id('[dbo].[RCHARINDEX]')

I get a hit on the first one, but not on the second one.

I did drop the functions using the command:

Use Master
go
IF EXISTS (select 1 from dbo.sysobjects where id = object_id('[dbo].[RAT]') )
DROP FUNCTION [dbo].[RAT]

Any suggestions?

Regards
block 5753
block 5753
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 26
As a bit of additional info, intellisense picks up the function correctly.

But still getting:

select dbo.RAT(' ',' hey there dudes',1)
Msg 4121, Level 16, State 1, Line 1
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.RCHARINDEX", or the name is ambiguous.
demonfox
demonfox
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2177 Visits: 1192
block 5753 (1/16/2013)
As a bit of additional info, intellisense picks up the function correctly.

But still getting:

select dbo.RAT(' ',' hey there dudes',1)
Msg 4121, Level 16, State 1, Line 1
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.RCHARINDEX", or the name is ambiguous.

you are not calling function "dbo.RCHARINDEX" from the dbo.RAT function ??
can you post the text ?

~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one Ermm
block 5753
block 5753
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 26
Hi There,

Yes I am very stupid.

That's what you get for using someone else's libraries Smile

The RAT function called the RCHARINDEX inside it, and I missed the call when I was looking through the source.

So, I decided to re-write the function, and as I was doing do, I found the reference, and before I could log on you asked the question!

Thanks for you response.

Sorry to waste your time.

Regards
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search