Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2013-02-13 : 09:09:45
|
I am writen something like this:IF Not EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vMems_URTT_st]'))BeginCreate view vMems_URTT_st as select * from [Mem_URT_TX] --customizeEndBut I am getting a red line under the Create statement say In corect syntax 'Create View'How can I write this?Thank youITM |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-02-13 : 09:26:02
|
SQL Server drives nuts with you this behavior, doesn't it? You could try this:IF Not EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vMems_URTT_st]'))BeginEXEC('Create view vMems_URTT_st as select * from [Mem_URT_TX] --customize')End |
|
|
itmasterw
Yak Posting Veteran
90 Posts |
Posted - 2013-02-13 : 09:49:35
|
Thank youThat did itITM |
|
|
|
|
|