I have a problem which makes me jump out of my socks.
There is a database with 6 fields, containing ID, PRODUCT, DESCRIPTION, FIELD1, FIELD2, FIELD3 with about 4000 records.
| ID | PRODUCT | DESCRIPTION | FIELD1 | FIELD2 | FIELD 3 |
| 1 | MP 10 005 | Power Cord | 135 gr. | PW CR | BLACK |
========================================= ... etc.
The product fields contain our own product number, which consist of 2 white spaces:
MP as our Brand name
10 product range
005 product ID
In our product catalogue, customers can search for our PRODUCTS, however sometimes they do not consider the white spaces, so they enter MP10 005 or similar. In my sql I want to remove the spaces from our product, remove the spaces from the search term, and compare.
The problem is, I am not able to use an sql command to remove the spaces from the product item.
I have solved the problem by duplicating the product column and inserting the products into a second column without spaces, which is used when searching.
Is there any sql command which can remove spaces from data extracted from the database?
I thank you for your time.