>The Dinosaur has inherited a SQL application that is driving him to give up drink!
>
>As briefly as possible; 2 selects (supposedly with the same structure) merged via union in a third select.
>
>the 2 selects are filled with many iif() functions.
>
>in the union, one of three plants getting "Select is not Union compatible".
>
>tried preallocating the TABLES, select still overrides the structure of the DBF and results in 2 slightly different structure (therefore incompatible).
>
>is there no way to predefine the output structures? i ignorantly thought that that would be the difference between a Cursor and a Table!!
>
>Version is Foxpro 2.6 Dos.....
>
>Thanks,
Make sure that your iif statements show the same format as the fields they are testing. For example if field1 is N(8,2) and field2 is C(10), in your select you migh need something like
SELECT IIF(field1=criteria,field1,00000.00) as f1, iif(field2=crit2,field2,space(10)) as f2 FROM ...
Let me know if this helps or I am way off base as to your problem...//:^)