Igor Tandetnik wrote:
[regarding where parameters allowed, "where literals are"]
>
> How did you discern this?

I know from experience where parameters work (SELECT, INSERT and
similar; also ATTACH as one of my projects happens to use it this way),
and where they don't (all forms of CREATE; I haven't tried ALTER but I'm
99% sure it won't work there either). I've just tested PRAGMA. I briefly
scanned the rest at http://sqlite.org/lang.html to confirm that their
syntax doesn't involve expressions.

I do not mean to be argumentative here, but I think the documentation on this leads to a different result. If you examine the syntax diagram for "create view", it refers to the construct 'select-stmt', which in turn refers to the construct 'expr'. (See http://sqlite.org/lang_createview.html , http://sqlite.org/lang_select.html , http://sqlite.org/lang_expr.html ) There, one alternative for expr is given as 'bind-parameter', which seems to not be defined under that name. However, the same page on 'expr' defines parameters. Since using parameters in a view appears to be allowed by the syntax diagrams, and since I saw nothing to the contrary where it logically should appear (as a semantic exception to the syntax), I went ahead and tried to use them in a view.

Best regards,
--
Larry Brasfield

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to