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 2000 Forums
 SQL Server Administration (2000)
 Query Snapshot

Author  Topic 

dwalker79
Yak Posting Veteran

54 Posts

Posted - 2008-07-10 : 08:15:27
Hello,

I'm still relatively new to SQL Server. I'm trying to figure out what's the best way to capture the results of a query at a specific time and then be able to query off those results at a later date. I know that if I use a view the results will be dynamic. I need them to be static. Is creating a temp table the best way to do this, or is there another mechanism to create some sort of a snapshot of the query in the database that could then be queried off of?

Any help would be greatly appreciated!
Dustin

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-10 : 08:24:26
Didn't get it! Can you explain clearly?
Go to Top of Page

dwalker79
Yak Posting Veteran

54 Posts

Posted - 2008-07-10 : 08:31:56
Basically I'm being asked if it's possible to store the results of a query into some sort of a temp table or something that could then be queried off of at a later date. We need queries results to be saved off and remain static as of a certain point in time. This data should ideally then be able to be queried off of. The only thing I can come up with is a temp table in the db?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-10 : 08:37:47
You can store in other logging table as well.
Go to Top of Page

dwalker79
Yak Posting Veteran

54 Posts

Posted - 2008-07-10 : 08:39:19
I'm not familiar with a logging table. Can you explain?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-10 : 08:41:35
Simply store the results in new table with datestamp.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-10 : 23:32:38
select * into new_table from table where ...
Go to Top of Page
   

- Advertisement -