>Hi,
>
>I have an interesting challenge. I am getting back from a SQL passthru stored procedure call, four separate result set cursors that when combined, create a single logical table. Across the result set(s), all column names are unique.
>
>Say the primary table name is "Client". I get back "Client", "Client1", "Client2", "Client3". I effectively want to add the columns in Client1-3 into Client. I have tried ALTER TABLE on the original Client table but there are numerous restrictions, not least of which, the long field names coming back from SQL server are illegal (over 10 chars) when trying to add them to the Client table - Client cursor is a SQL passthru cursor and is not defined in a DBC. In these circumstances, ALTER TABLE treats Client as a "free table" and imposes the column name limits.
>
>The data in Client is a single row. The data in Client1-3 are single rows and I need to add each column and its data as additional column(s) in Client. Make sense?
>
>Thanks,
Gary,
(Note:not completely understood)
AFAIK you can't use alter table in SPT cursors. Probably what I'd do is to create a temp cursor doing a:
select ... from client1..3 into cursor crsTemp readwrite
Do my processing in temp cursor and handle any updates through SPT.
OTOH I see VFP9 is your version. Then cursorAdapters and CursorSchema might be an easier path.
Cetin