SUBSTRING and SUBSTR documentation error

I just stumbled over an error in the documentation of SUBSTRING and SUBSTR

The example says that SUBSTRING('dremio user 1 2 3', 12) returns 1 2 3 when it actually returns 1 2 3

The example for SUBSTRING(<string>, from_idx, to_idx) further down is correct though

It would clarify things if the documentation stated wether the indexes are inclusive or not.

@dotjdk I see both return the same value, you have said " The example says that SUBSTRING('dremio user 1 2 3', 12) returns 1 2 3 when it actually returns 1 2 3 … what does this mean?

Oh, sorry. I didn’t notice. Looks like the code tag trims spaces. The “actually returns” has a space in front of 1 2 3. The 12th character (the space after user) is included in the return value, but in the example it is not

@dotjdk Sorry, unable to follow, is there an issue?

Yes, there’s a minor error in your documentation. But never mind. Not worth spending so much time on for me :slight_smile: I just stumbled on it and thought I would point it out

Hi @balaji.ramaswamy ,

I need your help that is latest version of dremio support sql injection or dynamic query replacement?
As we are using dremio for our Java project and using prepared statement to replace “?” with dynamic value.

Thanks,
Saurabh

@sauku Not yet, it is still in the roadmap