Question
SQL: too many prefixes error?
I'm trying to execute a stored procedure but keep getting
this error:
---------------------------
Microsoft SQL-DMO (ODBC SQLState: 42000)
---------------------------
Error 117: The number name
'SQLCRTPUB\COURTSPUBLIC,1892.DBCourtsPub.CourtsPub.WeFAQs' contains more
than the maximum number of prefixes. The maximum is 3.
The number name 'SQLCRTPUB\COURTSPUBLIC,1892.DBCourtsPub.CourtsPub.WeFAQs'
contains more than the maximum number of prefixes. The maximum is 3.
---------------------------
This is the SQL:
---------------------------
DELETE FROM [SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs
WHERE
([SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs.categoryID =
@categoryID) OR
EXISTS
(SELECT *
FROM
[SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.We_about_categories
WHERE parentCategoryID = @categoryID AND
categoryID =
[SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs.categoryID)
---------------------------
The issue, from what I can tell, is the WHERE clause where I'm tring to
access the categoryID column. It appears that I just have too many prefixes
there. How do I get around this? If I just put 'WeFAQs.categoryID =
@categoryID' I'm told 'weFAQs' doesn't match any table.
-Darrel
---------------------------
Microsoft SQL-DMO (ODBC SQLState: 42000)
---------------------------
Error 117: The number name
'SQLCRTPUB\COURTSPUBLIC,1892.DBCourtsPub.CourtsPub.WeFAQs' contains more
than the maximum number of prefixes. The maximum is 3.
The number name 'SQLCRTPUB\COURTSPUBLIC,1892.DBCourtsPub.CourtsPub.WeFAQs'
contains more than the maximum number of prefixes. The maximum is 3.
---------------------------
This is the SQL:
---------------------------
DELETE FROM [SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs
WHERE
([SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs.categoryID =
@categoryID) OR
EXISTS
(SELECT *
FROM
[SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.We_about_categories
WHERE parentCategoryID = @categoryID AND
categoryID =
[SQLCRTPUB\COURTSPUBLIC,1892].DBCourtsPub.CourtsPub.WeFAQs.categoryID)
---------------------------
The issue, from what I can tell, is the WHERE clause where I'm tring to
access the categoryID column. It appears that I just have too many prefixes
there. How do I get around this? If I just put 'WeFAQs.categoryID =
@categoryID' I'm told 'weFAQs' doesn't match any table.
-Darrel
