Yuzem <[email protected]> wrote:
> Thanks for the answer.
> I have another problem:
> I decided to use a view to do this, I will have to drop/create the view
> every time filters is updated but I don't know how to use multiple selects.
> I want to do something like this:
> 
> CREATE VIEW movies_filters AS SELECT 'rated',movie FROM movies WHERE rating
> != '' AND SELECT 'tagged',movie FROM movies WHERE movie in (SELECT movie
> FROM tags);

SELECT 'rated' as type, movie FROM movies WHERE rating != ''
UNION ALL
SELECT 'tagged' as type, movie FROM movies
    WHERE movie in (SELECT movie FROM tags);

-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to