dbTalk Databases Forums  

DTS Import/Export Process

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


Discuss DTS Import/Export Process in the microsoft.public.sqlserver.dts forum.



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

Default DTS Import/Export Process - 10-07-2004 , 03:28 PM






I'm attempting to use DTS Import/Export wizard to copy
data from one table column to another table column within
the same database. So far I have.....

select [Customer].[CompanyName]
from [Customer]
order by [Customer].[CompanyName]


How can I modify this query string to include the syntax
that tells DTS WHERE to place the data? Thanks


Reply With Quote
  #2  
Old   
ilona
 
Posts: n/a

Default Re: DTS Import/Export Process - 10-08-2004 , 10:12 AM






Use "Execute SQL Task" in DTS with the code like this sample, where
tblLessonCurrent is a destination table and tblTempLessonStatus is the
source table. The type of join in this example works if you have foreign
keys connecting the source and destination:

update tblLessonCurrent SET
LessonStatusID = T.LessonStatusID
FROM tblLessonCurrent
LEFT OUTER JOIN tblTempLessonStatus T
ON T.UserID = tblFactLessonCurrent.UserID
and T.LessonID = tblFactLessonCurrent.LessonID;

Regards,
Ilona Shulman


"MrMike" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm attempting to use DTS Import/Export wizard to copy
data from one table column to another table column within
the same database. So far I have.....

select [Customer].[CompanyName]
from [Customer]
order by [Customer].[CompanyName]


How can I modify this query string to include the syntax
that tells DTS WHERE to place the data? Thanks




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

Default Re: DTS Import/Export Process - 10-09-2004 , 06:05 AM



You can use a variety of tasks here

1. An ExecuteSQL task. In this your syntax would look like this

INSERT INTO TABLE(col list...)
select [Customer].[CompanyName]
from [Customer]
order by [Customer].[CompanyName]


2. A DataPump task. In that upi specify a source which is as you already
have. You then specify a destination and then the mapping between the two.

Building a Package in the DTS Designer
(http://www.sqldts.com/default.aspx?278)




--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"MrMike" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm attempting to use DTS Import/Export wizard to copy
data from one table column to another table column within
the same database. So far I have.....

select [Customer].[CompanyName]
from [Customer]
order by [Customer].[CompanyName]


How can I modify this query string to include the syntax
that tells DTS WHERE to place the data? Thanks




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.