Hello all,
Is there any way to use the ALTER TABLE/DROP COLUMN combo to drop a column by reference number? For instance, can I instead "drop the first column" rather than "drop column XYZ"? If there are any other ways to do this besides the SQL statement, then that's fine too.
What is going on is that we receive a spreadsheet from one of our customers of a list of orders. But the way the spreadsheet is formatted coming from them causes an invalid column to be created as the first column in the table. The clincher is this though, the column will have a different name every time they send it (it's based on a date).
I can just manually format the spreadsheet as necessary prior to importing it, but it would be MUCH preferable to handle as much of it through code as possible. The program I am working on is being used by people who may not necessarily grasp the necessary steps to prep the spreadsheet for an easy import.
If anyone has any ideas or suggestions, I'd be very grateful!
Thanks!
Brooks Tilson
Database Development
Tilson Machine, Inc.
Is there any way to use the ALTER TABLE/DROP COLUMN combo to drop a column by reference number? For instance, can I instead "drop the first column" rather than "drop column XYZ"? If there are any other ways to do this besides the SQL statement, then that's fine too.
What is going on is that we receive a spreadsheet from one of our customers of a list of orders. But the way the spreadsheet is formatted coming from them causes an invalid column to be created as the first column in the table. The clincher is this though, the column will have a different name every time they send it (it's based on a date).
I can just manually format the spreadsheet as necessary prior to importing it, but it would be MUCH preferable to handle as much of it through code as possible. The program I am working on is being used by people who may not necessarily grasp the necessary steps to prep the spreadsheet for an easy import.
If anyone has any ideas or suggestions, I'd be very grateful!
Thanks!
Brooks Tilson
Database Development
Tilson Machine, Inc.