I have a very long SQL query consisting of about 200 inserts. Someone suggested creating a stored proceedure with these queryies. Each line of the query is the same except the field names. (i.e.
INSERT INTO TEST (c1, c2,...cn) VALUES (v1, v2,...vn)
or
SQL = "INSERT INTO TEST(C1) VALUE (V1)
INSERT INTO TEST (C2) VALUE (V2)
...
INSERT INTO TEST (CN) VALUE (VN)"
How would I create a stored proceedure for these statements, and what would be the advantage to doing it that way rather than the way that I currently have it?
INSERT INTO TEST (c1, c2,...cn) VALUES (v1, v2,...vn)
or
SQL = "INSERT INTO TEST(C1) VALUE (V1)
INSERT INTO TEST (C2) VALUE (V2)
...
INSERT INTO TEST (CN) VALUE (VN)"
How would I create a stored proceedure for these statements, and what would be the advantage to doing it that way rather than the way that I currently have it?