unload to "/u/catcom/reports/telmax21/system/alfext1.csv" delimiter "," select unique site, extgroupunique, groupname.grname1, groupname.grname2, gnextra.grname3, extension from directtemplate, groupname, gnextra, directcustom where directtemplate.extgroupunique = groupname.grid and groupname.grid = gnextra.grid and directcustom.recordno = directtemplate.recordno and extension in ( 60101, 60555, 63351, 63973, 64009, 64016, 64020, 64022, 64029, 64052, 64066, 64069, 64070, 64071, 64073, 64076, 64079, 64085, 64086, 64093, 64101, 64108, 66006, 66016, 66018, 66019, 66034, 66137, 66140, 66142, 66150, 66154, 66156, 66170, 66184, 66205, 66212, 66234, 66237, 66239, 66241, 66255, 66265, 66273, 66278, 66284, 66285, 66301, 66302, 66310, 66357, 66361, 66370, 66402, 66410, 66412, 66415, 66425, 66430, 66434, 66449, 66450, 66452, 66454, 66472, 66473, 66474, 66475, 66478, 66484, 66486, 66488, 66495, 66497, 66613, 66627, 66646, 66653, 66654, 66658, 66692, 66710, 66724, 66728, 66734, 66737, 66738, 66742, 66749, 66765, 66769, 66783, 66784, 66790, 66795, 66802, 66803, 66811, 66813, 66824, 66828, 66835, 66838, 66851, 66854, 66857, 66866, 66867, 66868, 66869, 66872, 66880, 66882, 66886, 66892, 66893, 66901, 69803, 69807, 69811, 69821, 69859, 69860, 69864, 69868 ) order by 1, 2, 3;