Unanswered: Moving Source
At a high level, this is what I need to do in a stored procedure:
…so, I’m obviously stuck on what I’m going to fetch my_cursor into. Am I limited to scalar types?
CREATE VIEW TEMP_VIEW AS
SELECT * FROM SOURCE_XLS...Sheet1$
-the reason for creating the view is that the number of columns in Sheet1$ is not static.
By creating the view, I then can determine with sysobject/syscolumns how many columns I have to process for each row.
DECLARE my_cursor CURSOR
FOR SELECT * FROM TEMP_VIEW
DECLARE ? ?
FETCH NEXT FROM my_cursor INTO ??
DO STUFF WITH EACH COLUMN IN THAT ROW (as noted above, this will never be a static list of columns)
…and, inside the WHILE loop, can I refer to the columns by their index (i.e. which column number they are in the result set as opposed to the name)
…or is it back to the drawing board for a completely different approach.
Thanks for any input.
You're obsessed and distressed 'cuz you can't make any sense
Of the ludicrous nonsense and incipient senescence
That will deem your common sense useless