I have two tables "A" and "B". Table "A" has two columns "Body" and "Number." The column "Number" is empty, the purpose is to populate it.

Table A: Body / Number

ABABCDEF /
IJKLMNOP /
QRSTUVWKYZ /


Table "B" only has one column:

Table B: Values

AB
CD
QR


Here is what I am looking for as a result:

ABABCDEF / 3
IJKLMNOP / 0
QRSTUVWKYZ / 1


In other words, I want to create a query that looks up, for each string in the "Body" column, how many times the substrings in the "Values" column appear.

How would you advise me to do that?


Question: GDAL 1.10 ogr2ogr OSM "Unable to open datasource"
Answer: According to the comments here:
http://www.gdal.org/ogr/ogr_formats.html

"needs libsqlite3 (and libexpat for OSM XML)"

OSM isn't included by default.