Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 3rd, 2004, 04:14 PM
kfschaefer kfschaefer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 kfschaefer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question DTS - using multiple data sources

How do I use a view or query that references two different data sources ie 1 Oracle (APPPCT_PROJECT_TYPE ) and 1 table within my Sql. (ProjectTypes)

I want to use a query that looks and the data in the Oracle table compares it against my current table to determine if there are differenes and if so update current table with the differences in the data.

This is the query I would have used in Access: Help me to convert it use using DTS.



INSERT INTO ProjectTypes ( ProjectTypeCode, ProjectTypeDescrip, ProjectCatagory, ProjectClass, CapitalProjectNum, DateCreated, UserCreated, DateModified, UserModified )



SELECT APPPCT_PROJECT_TYPE.ID, APPPCT_PROJECT_TYPE.DESCR, APPPCT_PROJECT_TYPE.PROJ_DESCR_CATEGORY, APPPCT_PROJECT_TYPE.PROJ_CLASS, APPPCT_PROJECT_TYPE.CPN, Now() AS Expr1, "import" AS Expr2, Now() AS Expr3, "import" AS Expr4



FROM APPPCT_PROJECT_TYPE LEFT JOIN ProjectTypes ON APPPCT_PROJECT_TYPE.ID = ProjectTypes.ProjectTypeCode



WHERE (((ProjectTypes.ProjectTypeCode) Is Null));



Any assistance in this mater is greatly appreciated.



Sincerely,

Karen


Reply With Quote
  #2  
Old November 4th, 2004, 01:03 AM
Leslie's Avatar
Leslie Leslie is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Honolulu
Posts: 184 Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level)Leslie User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 20 h 29 m 2 sec
Reputation Power: 8
It is possible to create a link server from SQL Server to Oracle and use the linked tables in the same view (across servers) ... however, for simplicity I recommend you first dump the data from Oracle into a temporary table and then construct your SQL using the temporary table.



You will need in your DTS:

1 a data source to your Oracle Server

2 a data source to your SQL Server database

3 a translation between the two to dump the data to your temp table

4 a SQL task to generate the SQL you described above using SQL Server syntax (which is not that unsimilar to access)



for more help with SQL Server DTS see the following thread:

http://forums.aspfree.com/showthread.php?t=39002

I am very experienced with DTS so I will help you if you can’t get it but you should try to figure it out first, then tell me where you are stuck … good luck!

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > DTS - using multiple data sources


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway