Manoj
Manoj

Reputation: 21

ERROR: Subquery evaluated to more than one row

proc sql; 
update tableA
set tableA.measure=(select tableB.measure_id from TableB)
where tablA.CD=(select TableB.CD from TableB);
quit; 

WARNING: Character expression will be truncated when assigned to character column Measure. ERROR: Subquery evaluated to more than one row.

Could you please help

Upvotes: 0

Views: 198

Answers (1)

user18098820
user18098820

Reputation:

I think you might mean:

proc sql; 

UPDATE 
    tableA
SET 
    measure = tableB.measure_id
FROM 
    tableA
    JOIN tableB ON tablA.CD=TableB.CD;

quit; 

Upvotes: 1

Related Questions