General information
Category:
Coding, syntax & commands
Title:
Help with Union difficulties
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only