Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Union difficulties
Message
From
25/01/2000 16:55:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help with Union difficulties
Miscellaneous
Thread ID:
00322433
Message ID:
00322433
Views:
53
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.

Thanks,

Steve Watford
Next
Reply
Map
View

Click here to load this message in the networking platform