MS Wod mail Merge drop datasource

Wonderwall
Wonderwall used Ask the Experts™
on
Aloha I have just created my first mailmerger letter. It is connected to a SQL Server table. In my Stored Procedure drop the source and recreate it in exactly the same structure (monthly run).

Since I have the letter just the way I want will dropping the table drop the formatting? Should I do a truncate or delete and then an insert? mahalo for your help.    
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
GrahamSkanRetired
Top Expert 2012

Commented:
If I understand you, you have a working query that you use as a record source for your mail merge and you want to know if you should delete it.

I cannot think of a reason why you should do that. The next time that you run the mail merge, the data in the tables will probably have changed, but the query should still work with the new data.

Author

Commented:
Hi yes I do a table drop and recreate it in the stored procedure. I can change it to not drop the table and delete the data and insert new rather that drop. It's just more coding and there are alot of columns to line up on the insert rather tha select * into table
Commented:
I agree with Graham. Word has a connection to the database, and at run-time Word shoves a query into SQL Server via that connection. SQL Server interprets the query at that instant. As long as the table exists at that time, the query will work fine.

Tsk, tsk. Select * into ... doesn't give you very fine control over the column types, indexes, foreign keys, etc. Instead, why not script a CREATE on that table? Copy the resulting script into your stored proc. This way all the table attributes will be preserved.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial