On 5/12/2011 10:20 PM, John wrote:
> These are the names of actual views in this example. Let me rename them:
>
>> insert into rules_table values (1, view10);
>> insert into rules_table values (2, view20);
>> insert into rules_table values (3, view30);
>> insert into rules_table values (4, view40);

These are not valid SQL. Perhaps you meant

insert into rules_table values (1, 'view10');

Anyway, you can do something like this:

select * from view10 where :condition_in = 1
union all
select * from view20 where :condition_in = 2
union all
select * from view30 where :condition_in = 3
union all
select * from view40 where :condition_in = 4;

-- 
Igor Tandetnik

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

Reply via email to