Is it possible to do an insert by column number???
Like... INSERT INTO tabname 3 VALUES('some insert')
--> 3 being the column number
Thing is, I've got a stored procedure that builds a table dynamically. I need to insert a value into the table but I can't do a simple insert because the number and names of the columns can change each time it's run. So, getting the column count is easy enough. I've got a little loop that goes through and does the insert for each column number. That's where it fails. I could get the column names and use them, it would just be a whole lot easier if I can insert by column number.
Ideas???
Like... INSERT INTO tabname 3 VALUES('some insert')
--> 3 being the column number
Thing is, I've got a stored procedure that builds a table dynamically. I need to insert a value into the table but I can't do a simple insert because the number and names of the columns can change each time it's run. So, getting the column count is easy enough. I've got a little loop that goes through and does the insert for each column number. That's where it fails. I could get the column names and use them, it would just be a whole lot easier if I can insert by column number.
Ideas???