When I use following command it works fine.

CREATE VIEW dbo.[ikw_custom]
AS
SELECT * FROM rns_keyword.dbo.ikw_custom

but if I use following command with condition it gives me an error.

if not exists(select * from sysobjects where name ='ikw_custom' and type='V&#39
begin
CREATE VIEW dbo.[ikw_custom]
AS
SELECT * FROM rns_keyword.dbo.ikw_custom
end

help will be appriciated.
Thanks in advance
-Balbir