I have two datasets: inputdata and ref
I need NO field’s values in inputdata be updated with sub_num field’s values.
The condition is that first 9 characters from NO field’s value should be equal first 9 characters from mc_sub_num field’s values
This is the Error which Log generated:
proc sql;
347 update inputdata k
348 set NO = (select l.sub_num from ref l
349 where substr(k.NO,1,9)=substr(l.mc_sub_num,1,9)
350 )
351 where l.sub_num in(select l.sub_num from ref l);
ERROR: Unresolved reference to table/correlation name l.
352 quit;
What I am doing wrong?
Thank you!
Irin
I need NO field’s values in inputdata be updated with sub_num field’s values.
The condition is that first 9 characters from NO field’s value should be equal first 9 characters from mc_sub_num field’s values
This is the Error which Log generated:
proc sql;
347 update inputdata k
348 set NO = (select l.sub_num from ref l
349 where substr(k.NO,1,9)=substr(l.mc_sub_num,1,9)
350 )
351 where l.sub_num in(select l.sub_num from ref l);
ERROR: Unresolved reference to table/correlation name l.
352 quit;
What I am doing wrong?
Thank you!
Irin