Hi
You could do this, but i wouldn't. You will have a bigger effort to design and if you ever need to redesign, happy birthday..
mssql gives you the possibility to have stored procedures. these are simple sql statements like you write them in your src code, but you can combine many like you like to do it.
for example:
CREATE Procedure dbo.deletedocument
@document_number int
As
DELETE
FROM temp_approval
WHERE document_number = @document_number
DELETE
FROM temp_final
WHERE document_number = @document_number
DELETE
FROM temp_reasons
WHERE document_number = @document_number
DELETE
FROM temp_comments
WHERE document_number = @document_number
GO
if this procedure is implemented, you can call it with
SQL="EXECUTE deletedocument ,".$document_number;
The advantage is, you can call a SQL statement from many points in your code and if you have to change it, you have to change it at one place