Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Data not getting updated from Temp Table

Author  Topic 

rds207
Posting Yak Master

198 Posts

Posted - 2010-02-18 : 22:46:22
Hi

I am new to SSIS packages, infact to sql server, just trying to learn the things..

i have created a project , which has 2 packages, first one gets new data from another another sql server db source on different server,say ABC for past 7 days and load into the temp table on say another server XYZ,

2nd package will get the data from temp and compares it with my production db which is on same server, XYZ


i dont see any issue in getting the data into the temp table on server XYZ from ABC but the data is not getting updated into main table on XYZ...not sure if am missing something out here,

I have actually created a stored procedure , to get the diffdata from temp and load it into the main table...

Here is the Syntax i used for thE stored procedure...

USE [ASWTrans]
GO

/****** Object: StoredProcedure [dbo].[Proc_DiffData_SBABuild_Versions] Script Date: 02/18/2010 19:40:13 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[Proc_DiffData_SBABuild_Versions]
AS
BEGIN

SET NOCOUNT ON;

Select * from SBABUILD_VERSIONS_TEMP where PhoneBuild not in
(select PhoneBuild from SBABuild_Versions )

END

GO
-------------------------------------------------------------
So basically this gives the new phonebuilds from temp (sbabuild_versions_temp)table which are not there in main table(sbabuild_versions), , i can see new phonebuildS in temp table, but when i run the package those new builds are not updated into main table even though those builds are not theRE in main table

Please help....

X002548
Not Just a Number

15586 Posts

Posted - 2010-02-18 : 23:28:15
I hate SSIS and DTS

So..with THAT knowledge

What are you trying to? Where dows the data come from?

Are there updates? Inserts, Deletes?




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

rds207
Posting Yak Master

198 Posts

Posted - 2010-02-18 : 23:40:25
I am trying to import an table from one server to another both are sqlserver 2008 db's, but on different servers ....so i have created an SSIS package to get the updated data that means new data...

quote:
Originally posted by X002548

I hate SSIS and DTS

So..with THAT knowledge

What are you trying to? Where dows the data come from?

Are there updates? Inserts, Deletes?




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam





Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 00:19:45
quote:
Originally posted by rds207

I am trying to import an table from one server to another both are sqlserver 2008 db's, but on different servers ....so i have created an SSIS package to get the updated data that means new data...

quote:
Originally posted by X002548

I hate SSIS and DTS

So..with THAT knowledge

What are you trying to? Where dows the data come from?

Are there updates? Inserts, Deletes?




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam








you can use OPENDATASOURCE or add it as a linked server too based on if your need is ad hoc one or not

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rds207
Posting Yak Master

198 Posts

Posted - 2010-02-19 : 00:58:53
what is opendatasource?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 01:04:38
quote:
Originally posted by rds207

what is opendatasource?


see
http://msdn.microsoft.com/en-us/library/ms179856.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rds207
Posting Yak Master

198 Posts

Posted - 2010-02-22 : 13:12:16
Open DataSource does not work , because i cannot get the data with the below select statement which is there is my stored procedure to get the data from temp , even though there are phonebuild which are there in sbabuild_versions_temp and not there in sbabuild_versions

Select * from SBABuild_Versions_Temp where PhoneBuild not in
(select PhoneBuild from SBABuild_Versions )

quote:
Originally posted by visakh16

quote:
Originally posted by rds207

what is opendatasource?


see
http://msdn.microsoft.com/en-us/library/ms179856.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/



Go to Top of Page
   

- Advertisement -