Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Data Problems

Status
Not open for further replies.

OAKEJ

Programmer
Apr 13, 2005
39
US
I'm fairly new to SQL Server 2005. I imported a Table, made a package that queries the data from the imported table, however when the package runs in the nightly refresh it runs the query but doesn't update the imported table data. Has anyone run into this before. The package is debugged and finishes with success. Any help would be greatly appreciated. Thanks
 
What is the query?

"NOTHING is more important in a database than integrity." ESquared
 
USE BI_TEMP
GO
--
TRUNCATE TABLE
DBO.OAKEJ_LSSMETRICV
GO
--
INSERT INTO
DBO.OAKEJ_LSSMETRICV
--
SELECT *
--
FROM
DBO.ATHOMM_LSSMETRICV *******Imported Source Table
---------------------------------------------------------------------------------------------------------
--
IF (SELECT OBJECT_ID ('BI_TEMP.dbo.Shop_LSSMETRICS')) IS NOT NULL
BEGIN
DROP TABLE BI_TEMP.dbo.Shop_LSSMETRICS
END
---------------------------------------------------------------------------------------------------------
SELECT
Regions
,Site
,SHOP_Desc
,Cast(Cast(rptdate as Varchar(8))as smalldatetime) as Report_Date
,jobtime
,dwellhours
,productvty
,pmfailcnt
,getdate() as Log_Date

INTO BI_TEMP.dbo.Shop_LSSMETRICS

FROM BI_TEMP.dbo_OAKEJ_LSSMETRICV Metrics left join
BI_Temp.dbo_OAKEJ_Shop_Master_List Master_List
on Metrics.oasite = Master_List.Site

WHERE
Month(Cast(Cast(rptdate as Varchar(8))as smalldatetime))=Month(GetDate())

Order by
Regions
,Site
,rptdate
 
run just this part
SELECT *
--
FROM
DBO.ATHOMM_LSSMETRICV *******Imported Source Table
I think you forgot to comment out from the space on.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top