Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selects not union compatible and where clause
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00208947
Message ID:
00209004
Views:
22
Derek,

My guess is that you have some calculated fields. VFP makes a guess on the type and size for the field, usually based on the first record returned by the query. The WHERE clause could therefore change the field sizes in your result set, especially with numberic data. Try each query individually and see if there are any differences in the structures of the resulting cursors. You can use various tricks to force VFP to use a certain field size. Here's an example:
SELECT Field1+Field2+000000.00 AS Field3 ...
This should give you Field 3 with a length of 9 and 2 decimal places.

>I have an sql statement with a union that works fine until I add some additional criteria to the where clause and I get this error. (this is in VFP5) I have tried to make sure that the where clause is almost identical for obth the 1st and 2nd selects. Is there something I should be watching out for? I thought that the union should work based upon the fields in the select part and be independant of the where clause.
Previous
Reply
Map
View

Click here to load this message in the networking platform