file1
   ID Length Breadth height qty1
1 201   2500    1250   7.85 200
2 201      0      10   5.85 245
3 202      0       0   7.85 245
file2
   ID Length Breadth height qty2
1 201    250      12   7.85 200
2 201      0      10   5.85 250
3 202      0      12   8.00 200
I want all the rows where ID ,length , breadth & height matches
match1= stock[(req$ID == stock$ID) & (req$Length==stock$Length) &
               (req$Breadth==stock$Breadth) & (req$height==stock$height),]
match1
ID Length Breadth height    qty1    qty2
201  0        10    5.85    245     250
 
    