Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Thursday, April 7, 2016 1:54 PM
Points: 44, Visits: 92
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 @ 4:03 PM
Points: 14,326, Visits: 37,422
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
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: Thursday, April 7, 2016 1:54 PM
Points: 44, Visits: 92
that is correct. delete from table and then reinsert.
Post #1471570
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse