Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Executing a function

Author  Topic 

mepancha
Starting Member

5 Posts

Posted - 2005-04-28 : 11:53:39
Hi,
I have created a function test under the user name tom.dick under the database TELEVISION.

I executed the following sql in the query analyzer
SELECT TOP 1 CLIENT_NO, ACCOUNT,
tom.dick.test(CLIENT_NO),
tom.dick.test(CLIENT_NO)
FROM test_table
ORDER BY CLIENT_NO

I get the following error
Invalid object name 'tom.dick.test'.

I change the SQL to the following
SELECT TOP 1 CLIENT_NO, ACCOUNT,
TELEVISION.tom.dick.test(CLIENT_NO),
TELEVISION.tom.dick.test(CLIENT_NO)
FROM test_table
ORDER BY CLIENT_NO

I get the following error
The object name 'TELEVISION.tom.dick.' contains more than the maximum number of prefixes. The maximum is 2.

Please let me know as to how I solve this problem.

Thanks in advance

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-04-28 : 12:09:10
try using square brackets aroung username, tablename, dbname...
[TELEVISION].[tom.dick]

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -