I'm not sure why you're getting "... terms must [not] be
non-integer constants ..." instead of "no such column ...",
but I think the first thing you should do is run 'pragma
table_info' on your view to see what the column names are.
I'll be surprised if there's a column named p.product_name.

SQLite doesn't let you name columns in a view in the std
way, but you can work around that by naming the columns in
the query expression when you create the view:

  create view v as select t1.c1 a, t1.c2 b, t2.c1 c, t2.c2 d
  from t1, t2 where ...

Then your view will have columns named a, b, c, and d.

Other problems with your query:

 1. You don't need to call lower().  The like operator ignores
    case.

 2. It makes no sense to write '%%'.  That gives exactly the
    same result as '%'.  If you're trying to limit your results
    to 2-character strings, you want double underscore, not
    double percent.

Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to