Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hacker Guide Question
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Hacker Guide Question
Miscellaneous
Thread ID:
00625768
Message ID:
00625768
Views:
49
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!
Next
Reply
Map
View

Click here to load this message in the networking platform