Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - madness!
Message
From
26/04/1997 13:43:37
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
26/04/1997 11:20:55
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00029782
Message ID:
00029791
Views:
21
>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...//:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform