>I have a small prg feeding a report as follows:
>
>select date,amt,desc ;
>from bills;
>union;
>select date,amt,desc ;
>from payments;
>union;
>select date, amt, desc ;
>from adjustments;
>order by 3;
>into cursor temp
>
>The catch is the amt field in payments and adjustments is a 12 position numeric while the amt field in the bills table is a 10 position numeric field. This exact syntax works fine in VFP 6.0 and returns the correct results, but the app is in 2.6 for dos and returns an error "Select's are not Union Compatible". I isolated it to the diffence in field sizes by process of elimination. Any workaround for this other than modifying the table to make the fields the same size? I tried select val(padl(chr(amt),12,0)), but it didn't work. Any ideas why it would work in VFP, but not in 2.6?
>I can change the table, but they are getting huge and would have to change many other things as well.
>
A SWAG, but try making all occurances of amt in your query read instead:
000000000000.00 + amt
to force greater consistent precision. Add extra trailing digits if you need >2 decimal place precisions.