Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a SQL Server UDF
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00951187
Message ID:
00951191
Views:
10
Thanks Sergey, you're alway very helpful :)

Enmanuel

>You can call it w/o DB name
SELECT DBO.FN_DIASACALCULAR (@FechaIni,@FechaFin) As DiasACalcular
>
>>Hi All, I have the following code to call a SQL Server UDF.
>>
>>
>>Declare @FechaIni Datetime
>>Declare @FechaFin Datetime
>>
>>Set @FechaIni='20040830'
>>Set @FechaFin='20041030'
>>
>>SELECT DATA001.DBO.FN_DIASACALCULAR (@FechaIni,@FechaFin) As DiasACalcular
>>
>>
>>So far so good. But what if I want to make this sintax non database dependent, I mean, I'm planning to use this same function on several databases and I don't want to change the UDF's prefix on each one.
>>
>>It's there a way to call the UDF without the "DATA001.DBO" prefix. I've tried changing the UDF access to public but it didn't work.
>>
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform