Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Merge SQL PassThru Result Sets
Message
From
11/04/2005 07:47:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How To Merge SQL PassThru Result Sets
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01003317
Message ID:
01003317
Views:
60
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
Next
Reply
Map
View

Click here to load this message in the networking platform