||Re: sql code not working
Mervyn Bick <email@example.com>
||Sat, 16 Jun 2018 09:50:14 +0200
On 2018-06-15 11:40 PM, Charlie wrote:
> OK I have figured this out to a certain extent but it doesn't really work in this circumstance.
> I have a grid with the names of the vendors and another grid with the data. The data is different for different vendors. I used a masterfield property to connect the two. But since you can't index the virtual rowset I can't create an index using dbase to connect the two again. Hard to explain, but I'm not sure this is going to work....
Ah. In an earlier post you said no grids but I now see you meant no
grid for the totals.
How does, instead of having the totals in entryfields, having the totals
in the vendors' grid next to their other details sound? As you scroll
down the grid the data for each vendor's transactions will still appear
in the second grid as at present.
It is an simple matter to JOIN the new virtual totals table to the
existing vendors table so that it looks as if everything is in one
table. Once you see how easy this is you'll wonder how you managed to
do without this for so long. :-)
Even if you want to display the totals in entryfields rather than in the
vendor grid with the other details this is dead simple once the two
rowsets are JOINed.
If you post empty copies of your two tables I will be able to give you a
SQL statement that you can copy and paste into your query.
To make the copies
COPY STRUCTURE TO mb_vendors
COPY STRUCTURE TO mb_taldata