cube2222 / octosql

OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Mozilla Public License 2.0
4.74k stars 201 forks source link

Add charindex(String, String) function #325

Closed dwisiswant0 closed 1 year ago

cube2222 commented 1 year ago

How would that differ from the current position function @dwisiswant0?

dwisiswant0 commented 1 year ago

How would that differ from the current position function @dwisiswant0?

In my case, I don't know why I always got the error when using that function.

> octosql "SELECT POSITION('.' IN 'github.com')"
...
Error: couldn't parse query: invalid argument syntax error at position 36 near 'github.com'
dwisiswant0 commented 1 year ago

How would that differ from the current position function @dwisiswant0?

In my case, I don't know why I always got the error when using that function.

> octosql "SELECT POSITION('.' IN 'github.com')"
...
Error: couldn't parse query: invalid argument syntax error at position 36 near 'github.com'

Oh, I get it now. It should be:

SELECT POSITION('github.com', '.')

Lil' bit confusing for me.