Thanks Dennis, I was trying something like that at first but couldn't get it to work. But I still am going with Sami's solution. It puts the SELECT into the second Choose statement.
Jim


Dennis McGrath wrote:

oops, boo boo, this is better
select building_name into vBName from building +
WHERE building_id = .vbuildcode

--- Dennis McGrath <[EMAIL PROTECTED]> wrote:


Jim,

CHOOSE vbuildcode FROM #VALUES FOR building_name, building_id  +
FROM building +
ORDER BY building_name LINES 25

select building_name into vBName from building +
WHERE building_code=.vbuildcode

CHOOSE vdeptcode FROM #VALUES +
FOR DISTINCT (department_code & .vBName), department_code +
FROM main +
WHERE building_code=.vbuildcode


--ORDER BY department_code

you don't need the order by because the distinct will do that already


Dennis McGrath







Reply via email to