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.
Author |
Topic |
-Dman100-
Posting Yak Master
210 Posts |
Posted - 2007-02-24 : 15:13:17
|
I'm trying to determine the best approach to model tables for a registration form that will be used temporarily and then taken offline once the event is over. I'd like to either model the tables so that they were reusable for other registration forms or perhaps use another method to store the data, maybe using XML or some other method if that is possible?? I'm not sure.Different registration forms would have different input fields thereby requiring different table structures. It seems inefficient to create tables that will only be used temporarily and then no longer used. So, I would need to remember to delete the tables after they have been used or they would just take up space.The basic requirement for this registration form is to allow the user to fill out the required fields, submit, get a registration reciept confirming their registration and allow the administrators for the event to pull the data weekly or daily into an excel spreadsheet.I can create a flat table and a stored procedure that inserts the data. I can also write the dts package that exports the data to an excel file, which would require my intervention. I'd like to have something more automatic without my intervention.Any suggestions would be appreciated. I'm not sure the best approach for this. Is using tables the best way to go even if the tables aren't re-usable? Requiring my attention to delete afterwards.What are the options to generate the excel reports without my intervention?Thanks in advance for any help. |
|
gvphubli
Yak Posting Veteran
54 Posts |
Posted - 2008-01-30 : 23:50:16
|
I would suggest using XML and have seperate template for each event depending on the fileds that needs to be filled.But for dropping tables automatically here is the solution.Create the table with some kind of PREfix like Evt001_Seattle, Evt001_Burlinton etc..and create some table, you may call it as "AutoCleanup". The schema would likeAutoCleanup( TablePreFix varchar(100), EndDate DATETIME)Have a SQL Agent job or NT Job that runs looks throught this above table periodically like ones a day or something like that and prepare dynamic "DROP TABLE <table_name>" statements dynamically using curosor etc.TechnologyYogihttp://gvphubli.blogspot.com/ |
 |
|
|
|
|