// Selection of image data in the multimedia table
Select substring(SPATH from 6 for 200) Path ,trim(SSTockCode) || '/'|| sorgfilename dest,sgroup FROM
MULTIMEDIA join stock on wrefid = wstockid where WREFID = <@WSTOCKID@> and STYPE = 'STOCK' and (SPATH like 'link:%' or SPATH like 'file:%') 
and (SGROUP = 'products_image' or SGROUP = 'products_subimage1' or SGROUP = 'products_subimage2' or SGROUP = 'products_subimage3' or SGROUP = 'products_subimage4' or SGROUP = 'products_subimage5' or SGROUP = 'products_subimage6')
