i have to update column .there is one to many relationship between two tables.and i am trying to do this ..

update line set passcode= "(select mdn from line l,line_esn le where l.line_id=le.line_id )"

passcode value is last 4 digit of mdn. mdn is 10 digit number.so how do i substring the mdn.likemdn.substring(6,10) .should i have to use function..