Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate field names in SPT
Message
De
19/09/2003 09:16:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/09/2003 09:09:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00830629
Message ID:
00830632
Vues:
16
>Hello
>If the result of a SQL-SELECT query in VFP DBF has duplicate field names, Visual Foxpro adds "_A" to the first duplicate field and "_B" to the second.
>
>If the query is run in SQL server via Sqlexec, the first field returns with the name unchanged, and the second with a "1" appended.
>
>Is there any way to control this, that is, to get the same behavior? I have tons of reports that expect "_A" in field names.
>
>Thanks!

Explicitly name your fields. ie:

select * from customer inner join orders on customer.cust_id = orders.cust_id

would name cust_id as cust_id_a and cust_id_b.
select cs.cust_id as 'cust_id_1', o.cust_id as 'custID' ;
 from customer cs ;
 inner join orders o ;
 on customer.cust_id = orders.cust_id
Explicitly names fields to cust_id_1 and CustID and works with both VFP and SQL server.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform