"Qualify Object Names" not working

RalphRalph Posts: 6
edited January 16, 2007 1:49PM in SQL Refactor Previous Versions
Hi to all

I am trying to use the "Qualify Object Names" tool but it complains about "not being able to fully qualify this script because some syntax errors were found while it was being parsed".

However the "Lay Out ..." tool works fine. It also does not highlight any syntax errors. It is with a script that creates a stored procedure that I am using the Qualify tool and the stored procedure is created without any problems.

Does anyone have any idea as to what is going wrong?

Best regards

Ralph Price

-- *****

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE rdc_SDE_Unittype_Update
AS
BEGIN

-- Purpose: Update SDE unittypes frpm Hansen (IMS)
-- this field is duplicated for cartographic purposes.
-- Author: Clarrie Hall
-- Date: 2005-10-07

--use utility

-- Water Supply

update wsbackflowpreventer
set unittype = h.unittype
from wsbackflowpreventer s
, cabsql2.ims.imsv7.compwbf h
where s.compkey = h.compkey
and h.unittype is not null

update wsmeter
set unittype = h.unittype
from wsmeter s
, cabsql2.ims.imsv7.compwmtr h
where s.compkey = h.compkey
and h.unittype is not null

update wshydrant
set unittype = h.unittype
from wshydrant s
, cabsql2.ims.imsv7.comphy h
where s.compkey = h.compkey
and h.unittype is not null

update wsmainline
set unittype = h.unittype
from wsmainline s
, cabsql2.ims.imsv7.compwmn h
where s.compkey = h.compkey
and h.unittype is not null

update wsmiscellaneous
set unittype = h.unittype
from wsmiscellaneous s
, cabsql2.ims.imsv7.compwms h
where s.compkey = h.compkey
and h.unittype is not null

update wsnode
set unittype = h.unittype
from wsnode s
, cabsql2.ims.imsv7.compwnd h
where s.compkey = h.compkey
and h.unittype is not null

update wsserviceline
set unittype = h.unittype
from wsserviceline s
, cabsql2.ims.imsv7.compwsl h
where s.compkey = h.compkey
and h.unittype is not null

update wsstorageunit
set unittype = h.unittype
from wsstorageunit s
, cabsql2.ims.imsv7.compwsu h
where s.compkey = h.compkey
and h.unittype is not null

update wsvalve
set unittype = h.unittype
from wsvalve s
, cabsql2.ims.imsv7.compwv h
where s.compkey = h.compkey
and h.unittype is not null

update wswell
set unittype = h.unittype
from wswell s
, cabsql2.ims.imsv7.compwell h
where s.compkey = h.compkey
and h.unittype is not null

-- Storm Water

update swbackflowpreventer
set unittype = h.unittype
from swbackflowpreventer s
, cabsql2.ims.imsv7.compstbf h
where s.compkey = h.compkey
and h.unittype is not null

update swchannel
set unittype = h.unittype
from swchannel s
, cabsql2.ims.imsv7.compstch h
where s.compkey = h.compkey
and h.unittype is not null

update swinlet
set unittype = h.unittype
from swinlet s
, cabsql2.ims.imsv7.compstin h
where s.compkey = h.compkey
and h.unittype is not null

update swmainline
set unittype = h.unittype
from swmainline s
, cabsql2.ims.imsv7.compstmn h
where s.compkey = h.compkey
and h.unittype is not null

update swmanhole
set unittype = h.unittype
from swmanhole s
, cabsql2.ims.imsv7.compstmh h
where s.compkey = h.compkey
and h.unittype is not null

update swmiscellaneous
set unittype = h.unittype
from swmiscellaneous s
, cabsql2.ims.imsv7.compstms h
where s.compkey = h.compkey
and h.unittype is not null

update swnode
set unittype = h.unittype
from swnode s
, cabsql2.ims.imsv7.compstnd h
where s.compkey = h.compkey
and h.unittype is not null

-- update swpond set unittype = h.unittype
-- from swpond s, cabsql2.ims.imsv7.compstp h
-- where s.compkey = h.compkey and h.unittype is not null

update swpumpstation
set unittype = h.unittype
from swpumpstation s
, cabsql2.ims.imsv7.compstls h
where s.compkey = h.compkey
and h.unittype is not null

update swserviceline
set unittype = h.unittype
from swserviceline s
, cabsql2.ims.imsv7.compstsl h
where s.compkey = h.compkey
and h.unittype is not null

update swstoragebasin
set unittype = h.unittype
from swstoragebasin s
, cabsql2.ims.imsv7.compstsb h
where s.compkey = h.compkey
and h.unittype is not null

update swvalve
set unittype = h.unittype
from swvalve s
, cabsql2.ims.imsv7.compstv h
where s.compkey = h.compkey
and h.unittype is not null

-- Waste Water

update wwmainline
set unittype = h.unittype
from wwmainline s
, cabsql2.ims.imsv7.compsmn h
where s.compkey = h.compkey
and h.unittype is not null

update wwmanhole
set unittype = h.unittype
from wwmanhole s
, cabsql2.ims.imsv7.compsmh h
where s.compkey = h.compkey
and h.unittype is not null

update wwmiscellaneous
set unittype = h.unittype
from wwmiscellaneous s
, cabsql2.ims.imsv7.compsms h
where s.compkey = h.compkey
and h.unittype is not null

update wwnode
set unittype = h.unittype
from wwnode s
, cabsql2.ims.imsv7.compsnd h
where s.compkey = h.compkey
and h.unittype is not null

update wwpumpstation
set unittype = h.unittype
from wwpumpstation s
, cabsql2.ims.imsv7.compsp h
where s.compkey = h.compkey
and h.unittype is not null

update wwserviceline
set unittype = h.unittype
from wwserviceline s
, cabsql2.ims.imsv7.compssl h
where s.compkey = h.compkey
and h.unittype is not null

update wwvalve
set unittype = h.unittype
from wwvalve s
, cabsql2.ims.imsv7.compsv h
where s.compkey = h.compkey
and h.unittype is not null

-- EOF
END
GO
-- *****

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Ralph,

    I think this goes back to a problem that a lot of the red gate tools suffer from, and that is fully-qualified objects that are qualified up to the database level make it hard for Refactor to resolve object dependencies.

    This is particularly relevant with objects that exist in another database. If cabsql2 is a linked server or another database, then it more than likely would have problems parsing the dependencies.

    Hopefully this is something Red Gate can improve on.
  • Hi Brian

    thanks for the reply. I will continue to happily use the tools anyway.

    Best regards

    Ralph Price
Sign In or Register to comment.