Re: [SQL] problem with view and case - please help

2000-07-21 Thread DalTech - CTE
Instead of: > WHEN $1 LIKE \'Mozilla/2.0 %\' AND $1 NOT LIKE \'%MSIE%\' AND $1 NOT > LIKE \'%compatible%\' THEN \'Netscape 2.0\' > WHEN $1 LIKE \'Mozilla/2.02 %\' AND $1 NOT LIKE \'%MSIE%\' AND $1 NOT > LIKE \'%compatible%\' THEN \'Netscape 2.02\' > WHEN $1 LIKE \'Mozilla/2.02E %\' AND $1 NOT LIK

Re: [SQL] problem with view and case - please help

2000-07-21 Thread Ange Michel POZZO
the idea of a funtion is a good idea, thanks a lot ! i am a newbie to sql, after some try, i have made a function like this : create function browser(text) returns text AS 'SELECT CASE WHEN $1 LIKE \'%MSIE 2.0;%\' THEN \'Internet Explorer 2.0\' WHEN $1 LIKE \'%MSIE 3.0;%\' THEN \'Internet Explor

Re: [SQL] problem with view and case - please help

2000-07-21 Thread Volker Paul
> CREATE VIEW browser > AS > SELECT > agent_i, > CASE > WHEN agent_i LIKE '%MSIE 2.0;%' THEN 'Internet Explorer 2.0' > ... > agent_i NOT LIKE '%compatible%' THEN 'Netscape' > WHEN agent_i LIKE 'Mozilla/5.0 %' AND agent_i NOT LIKE '%MSIE%' AND > agent_i NOT LIKE '%compatible%' THEN 'Netscape' > WHE