dbTalk Databases Forums  

DTS Won't Accept embedded view

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS Won't Accept embedded view in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wayne Wengert
 
Posts: n/a

Default DTS Won't Accept embedded view - 09-05-2003 , 11:58 AM






Using SQL Server 2000

I have the following View
================
SELECT DISTINCT TOP 100 PERCENT Email, FullName
FROM dbo.[AllUnitEmail]
WHERE (Email LIKE '%@%')
ORDER BY FullName
================

There is another view named "dbo.AllUnitEmail"

If I use Query Analyzer to Open this view it is fine.

If I use DTS to do a copy of all objects I get an error on this view
indicating "Invalid Object Name" for dbo.AllUnitEmail

It appears DTS does not like it if a View embeds a reference to another
View?
Has anyone else seen this? Is there a workaround?

--
------------------------------------
Wayne Wengert
wayne (AT) wengert (DOT) org



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Won't Accept embedded view - 09-06-2003 , 01:24 AM






Script your views and apply them instead.

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Reply With Quote
  #3  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default Re: DTS Won't Accept embedded view - 09-10-2003 , 09:54 AM



Hi Wayne,

I perform an experiment on my side. I do not found the problem which you
post. The detailed steps which I performed are below:

1. Use Nothwind sample database.
2. Create Two View called VIEWtest1 and Testview2 below:

VIEWtest1:
CREATE VIEW dbo.VIEWtest1
AS
SELECT CustomerID, ContactName
FROM dbo.Customers
~~~~~~~~


VIEWtest2:
CREATE VIEW dbo.VIEWtest2
AS
SELECT ContactName
FROM dbo.VIEWtest1
~~~~~~~~

3. Please select the "Copy objects and data between SQL Server databases"
option in the Specify table copy or query" dialog when you are setting in
the DTS Import/Export Wizard.
a. In the "Select Objects to Copy" dialog, the "Use Default Options" was
checked. Please unchecked that and then clicked "Options" button.
b. "Copy database users and database roles" was checked. Please unchecked
this as well as unchecking "Copy SQL Server logins".
c. Press OK and go ahead.

4. In the "Select Objects to Copy" dialog, the "Copy all objects" was
checked. Please unchecked that and then clicked "Select Objects" button.
Chose the View called Viewtest2. Press Ok and go ahead.

It works on my side. I do not found any error messages. Could you try and
check to see if it works on your side?

Note: In the destination SQL Server, please make sue there are no views
called Viewtest1 and Viewtest2.

Hope it helps. If you have any concerns, please post it directly on the
newsgroup. I will be happy to provide the support service.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.