SUBSTRING function in SQL queries The SUBSTRING() function extracts the substring from the specified string based on the specified location. In the below example, we retrieve a substring using the specified inputs. We can understand the substring output using the following image.
I created a view on a machine using the substring function from Firebird, and it worked. When I copied the database to a different machine, the view was broken. This is the way I used it:
SELECT SUBSTRING(field FROM 5 FOR 15) FROM table;
And this is the output on the machine that does not accept the function:
token unknown: FROM
Both computers have this configuration:
Any ideas about why it's behaving differently on these machines?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With