Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Inserting Results from SPROC into table Expand / Collapse
Author
Message
Posted Tuesday, July 9, 2013 5:56 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 6:59 AM
Points: 26, Visits: 42
what we are utilmately trying to do is run this procedure on a daily or weekly basis to pull in the actual price of our material to load into a reporting system. Once this table is created, we then import this data into a more permanent dimensional table that holds all the facts for a dimensional cube. So when this SPROC runs, it would just need to clear what is in the table and refresh with updated data.
Post #1471565
Posted Tuesday, July 9, 2013 6:01 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:50 AM
Points: 12,877, Visits: 31,792
tstagliano (7/9/2013)
what we are utilmately trying to do is run this procedure on a daily or weekly basis to pull in the actual price of our material to load into a reporting system. Once this table is created, we then import this data into a more permanent dimensional table that holds all the facts for a dimensional cube. So when this SPROC runs, it would just need to clear what is in the table and refresh with updated data.


in that case, it seems like the table must exist, but the sproc needs to DELETE FROM dbo.tblPlexActualPrice or TRUNCATE TABLE dbo.tblPlexActualPrice, instead of than destroy and create the table?


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1471568
Posted Tuesday, July 9, 2013 6:04 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 6:59 AM
Points: 26, Visits: 42
that is correct. delete from table and then reinsert.
Post #1471570
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse