if (peek('Line_ID',-1) = Line_ID,'Dup','NoDup') as DupRec RESIDENT _brand2tmp ORDER BY Line_ID;
DROP TABLE __brand2tmp;
However QV falls over at the end of the script. If I comment one of the sections out, ie only load Brand1 sales, its fine and duplicates are marked ok etc. What is it I am doing wrong here? Do I need to join the tables first, something I haven't had to do before.