Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2005, 10:53 AM
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Function Execution

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

 
Old May 1st, 2005, 05:52 AM
Authorized User
 
Join Date: Oct 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think the format here should be:

server.owner.object

Therefore the name tom.dick is causing problems. If Tom.Dick is the owner of the object then i suggest you try [tom.dick].Test(Client_No).

I have never used a function before and this sytax may have changed in SQL2K where you can have more than server running on a single machine.

Comments anyone?








Similar Threads
Thread Thread Starter Forum Replies Last Post
pausing execution dcher BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 1 January 7th, 2008 04:26 AM
Auto Execution !!! dpkbahuguna ASP.NET 1.0 and 1.1 Basics 0 February 1st, 2007 01:37 AM
Script execution... dzagore2 Classic ASP Professional 0 May 9th, 2006 03:42 AM
Performance Issue of Execution bjohnjebastin ASP.NET 1.0 and 1.1 Basics 1 November 14th, 2005 11:18 AM
Execution B.V.Madhav Crystal Reports 0 May 9th, 2005 04:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.