-1

i have two table (D1 and D2)

D1

site  dmax 
A     20
B     30
C     40

D2

site  velocity
A      120
A      130
A      130
B      140
B      140
C      134
C      124
C      152

My requirement is a third table D3 with column site, velocity and dmax together e.g.

site  velocity dmax
A      120     20
A      130     20
A      130     20
B      140     30
B      140     30
C      134     40
C      124     40
C      152     40
Roland
  • 127,288
  • 10
  • 191
  • 288

1 Answers1

2

Use merge

> merge(D2, D1)
  site velocity dmax
1    A      120   20
2    A      130   20
3    A      130   20
4    B      140   30
5    B      140   30
6    C      134   40
7    C      124   40
8    C      152   40
Jilber Urbina
  • 58,147
  • 10
  • 114
  • 138
  • actually i want to add dmax in table D2. for that which i think lookup can be used. but i dont know how to use that and update table D2 – user3867546 Jul 23 '14 at 17:05