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 |
juliaisabel
Starting Member
3 Posts |
Posted - 2007-05-16 : 12:12:25
|
I am looking for the best method of automating an INSERT query in SQL Server 2005Code:-------------------------------------------------------------------------------- 'INSERT INTO SaltInvWhOpen (StockCode, Warehouse, TrnMonth, TrnYear, OpenBalQty, OpenBalCost)SELECT StockCode, Warehouse, Month(GETDATE()) AS TrnMonth, YEAR(GETDATE()) AS TrnYear, OpenBalQty12, OpenBalQty12 * UnitCost AS Expr1FROM InvWarehouse --------------------------------------------------------------------------------In older versions I would have used a DTS package (It's been a long time and I'd have had to use a book to guide me through it), but as that is gone now, I am unsure where to even begin looking.If someone could assist by giving me the current method, and dare I ask, walk me through it, the help would be much appreciated.Thank you!Julia |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-16 : 12:15:35
|
Do you need to frequently run this Insert? If yes, you can wrap this query in a job and schedule the job to run.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
juliaisabel
Starting Member
3 Posts |
Posted - 2007-05-16 : 12:18:51
|
Yes, I do need it to run on a monthly basis. How do I create a job? Thanks so much for your help!!!! |
 |
|
juliaisabel
Starting Member
3 Posts |
Posted - 2007-05-16 : 12:36:07
|
Never Mind, found it. Thanks for your help!JuliaJulia I Romero |
 |
|
|
|
|
|
|