Select substring(SPATH from 6 for 200) Path , sorgfilename dest FROM
MULTIMEDIA where Stype = 'STOCK' and  (SPATH like 'link:%' or SPATH like 'file:%') 
and WREFID = <@WSTOCKID@>
union
Select substring(SPATH from 6 for 200) Path , 'thumb_'||sorgfilename dest FROM
MULTIMEDIA where Stype = 'STOCK' and  (SPATH like 'link:%' or SPATH like 'file:%') 
and WREFID = <@WSTOCKID@>
