Hello,
It seems that Y=0 denotes a fictitious empty position before the first one (Y=1).Is it the intended behaviour?
The documentation (https://www.sqlite.org/lang_corefunc.html#substr), says nothing about this specific pattern.
Even if it not intended, it will be very handy in some circumstances. Treating 0 as a non-existing position is more flexible behavior then generating errors, exceptions, roll--backs or a nuclear launch. Such behavior saves (or can save at least) time and code space on both sides: on the SQLite's side (eliminates checking against 0 and an effort related to it) and on your code's side. Additionally, the behavior is consistent and predictable -- it gives advantages only.
-- best regards Cezary H. Noweta _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users