I work with perl and sybase. I try to create view in perl:
if(condition)
create view name_view
as select col1,col2,col3
from table1,table2
where key1=key2
else (condition)
create view name_view
as select col1,col2,col2
from table1,table3
where key1=key2
And when I run it, I always get an error, that view is already exists.
Even I put an if - exists
condition.
drop view name_view
it is always the same error.
Please note: I cannot create a view in separate query, because when I select from view, it works very slow.