Hi there,
I'm new to SQLExp and have been writing some queries over the past few weeks on a database I'm developing.
I now want to assemble my queries into a procedure that I can schedule (which I understand has its challenges in Express but I'll work on that at a later date).
The queries I have are to do this;
- Bulk insert from txt files in temp table
- data adjustments
- integrity check
- insert into main table
At the minute I have these as 4 .sql files and not 100% clear on how to move this to a procedure. For e.g.
- Should I aim to consolidate my 4 .sql files into 1 or create a procedure that calls each of these. n.b. the 4 files need to be run in sequence
- Also, where will the procedure be stored? Inside the database it runs on or as a stand alone file like my .sql files
- Finally, since I have already written my sql is creating the procedure as simple as copy paste into the Management Studio or is there a better way?
thanks,
Bassmann