Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Merge SQL PassThru Result Sets
Message
De
11/04/2005 07:47:53
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
How To Merge SQL PassThru Result Sets
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01003317
Message ID:
01003317
Vues:
64
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform