On Jan 28, 2005, at 10:53 AM, Kurt Welgehausen wrote:
David,
No, you can't specify a collation when creating a view (http://www.sqlite.org/lang_createview.html). I don't know whether is was intentional that simple columns in a view don't get collation info from the base table, but if you think it's a bug, you can submit a bug ticket; meanwhile, there are work- arounds.
Yes, it seems to me that views should respect the configurations of their underlying tables, including collations, triggers, and the like. I'll submit a bug report.
For sorting, you can specify a collation
... order by b collate nocase
If all you need is caseless comparison, you can use
select * from va where lower(b) = 'this'
That's what I needed, thanks. Will that use the index, though?
If you need a more complicated comparison, you'll probably have to write a comparison function:
select * from va where mycomp(b, x) = 0
Thanks for the help.
Regards,
David

