Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cast() is evaluated for every record
Message
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00940524
Message ID:
00940788
Views:
16
The SQL Server UNION works the same way so I doubt that VFP behavior will change in this respect.

>
>My point was, yes UNION worked this way BEFORE VFP9 which is before CAST(). IMO, other parts of the language should evolve along with the rest of it. Since CAST() has come later than the way the UNION worked in the past, UNION should also evolve to take into consideration what CAST is designed to do. While data types have a precedence order in a UNION, the CAST function should supercede this precedence since its design is to force a data type change regardless of precedence.
>
>I do see your point on this precedence since we now have an Integer in the first SELECT and a numeric in the second SELECT, but since a CAST was used in the first one, let that take the precedence. If no CAST was used, default back to the original UNION precedence.
>
>Oh well, maybe an ER for VFP 10...
>
>..but then again David's suggestion using INSERT INTO...SELECT FROM also solves this problem as long as what you are inserting into has the (compatible) data type structure you want. Hmmm, maybe forget the ER and all this... < g >
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform