Comments
2 comments
-
Additional info:
I updated the database by running all the other part of the scriptfile. So now it's only FUNCTION1 and FUNCTION2 that differs. But I still get an illegal scriptfile.
It works fine if I change the name (DROP/CREATE) of FUNCTION2.
If I change it back it doesn't work
I have tried several different names - and all (but the one I want) works fine???
PS. We have earlier had problems with illegal denpendencies in our scriptfiles generated by SqlCompare. It slows our update procedure down, when we have to modify the script manually each time. -
Thanks for your post. Have you tired this using V9 of SQL Compare at all?
Add comment
Please sign in to leave a comment.
CREATE dbo.FUNCTION1()
RETURNS TABLE
AS
RETURN (
SELECT ... FROM dbo.FUNCTION2()
INNER JOIN ...something...
)
CREATE dbo.FUNCTION2()
RETURNS @... TABLE
(
...some table elements
)
AS
BEGIN
INSERT INTO @...
SELECT .... FROM TABLE WHERE...
END
My problem is that the script fails (Invalid object name 'dbo.FUNCTION2') because FUNCTION2 is specified AFTER FUNCTION1 in the script generated by SqlCompare8.
I have tried to use /option:IncludeDependencies without any success.
Is there anyway to force SqlCompare to handle the case correctly?