**SQL Routine for MS SQL Server - Description:**
Overview: Loop through a SQL table and conditionally write values to other tables.
The attachment contains full decsription of the required routine plus SQL script for generating the tables and an Excel data file for test data.
Import the Excel file [[url removed, login to view]] into MS SQL. It will import as **Sheet1$**.
Loop through records in **Sheet1$**table and read/insert the data into **exp_invoice,** **inc_deposit, well, purchaser, operator** tables according to the rules described in the routine.
1) SQL script either a store procedure or funciton that can be run in Enterprise Manager.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Microsoft SQL Server 2000