Hello,
I am trying to create a table using proc sql and I have a problem. Some but not all rows are getting doubled in the process. The code looks as follows:
PROC SQL;
CREATE TABLE WORK.STEP AS
SELECT
t1.group,
t1.time,
t1.profit
FROM WORK.INPUT_FILE t1
LEFT JOIN WORK.GROUPS t2 on (t2.g0="*" OR (find(t1.group, strip(t2.g0) ) AND (Missing(t2.g1) OR find(t1.group, strip(t2.g1)))
AND (Missing(t2.g2) OR find(t1.group, strip(t2.g2)))));
QUIT;
Main thing here is that t1.group variable has a lot of different values and I wanna use the summary procedure later to aggregate some of the profit numbers. So, the groups I want to use are stored in three variables in table two (g0, g1, g2). But, for some groups it does this weird thing, that this sql procedure duplicates rows for specific groups. Not all of them, just a few, that have nothing particular in common. Does anyone know, why this might be happening?
Thanks in advance,
Bajtan