Consider the following table:
ticker code
--------------
AA 151040
AAP 452020
DOW 151010
DVN 151020
EXC 452050
FAD 452070
POE 207010
I would like to select the tickers per code – but comparison has to be made on only the first four numbers of the code (so: 1510, 4520, 1510, etc), giving a result like:
1510 AA
1510 DOW
1510 DVN
4520 AAP
4520 EXC
4520 FAD
2070 POE
With what query can I take only the first four numbers?
Use
LEFT: