Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hacker Guide Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Hacker Guide Question
Divers
Thread ID:
00625768
Message ID:
00625768
Vues:
45
Hi Tamar,

In the Hacker's Guide under the Select-SQL topic regarding UNIONs is the following paragraph:

There's one important set of rules for UNIONing queries. The field list for each query in the UNION must have the same number of items. Corresponding items must be the same type. The first query in the UNION creates the template for the result, so fields in subsequent queries must be no larger than those in the first query. (They can be smaller.) If you think about what's going on here, the whole set of rules makes sense.


I was just trying to do a UNION and the (they can be smaller) part doesn't seem to be correct. The following errors with a non-compatible union.
select CompanyName ; && a c(50) field in MyTable
  from MyTable ;
  UNION ;
  select space(1) as CompanyName ;
  from SomeOtherTable
Based on the HG quote above, that should work, correct?
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform