Hi, I have a problem, maybe someone can help me.
I'm traing to create a view with a Linked Server
This query works great:
select id, descr
from SERVER.DB.dbo.TABLE
When I tray to create the view:
CREATE VIEW dbo.View1 WITH SCHEMABINDING
AS
select id, descr
from SERVER.DB.dbo.TABLE
GO
I have this error:
Server: Msg 4512, Level 16, State 3, Procedure Pais2, Line 3
Cannot schema bind view 'dbo.View1' because name 'SERVER.DB.dbo.TABLE'
is invalid for schema binding. Names must be in two-part format and an
object cannot reference itself.
So I try this:
CREATE VIEW dbo.View1 WITH SCHEMABINDING
AS
select SERVER.DB.dbo.TABLE.id, SERVER.DB.dbo.TABLE.descr
from SERVER.DB.dbo.TABLE
GO
I have this error:
Server: Msg 117, Level 15, State 2, Procedure Pais2, Line 3
The number name 'SERVER.DB.dbo.TABLE' contains more than the maximum
number of prefixes. The maximum is 3.
Then I try this:
CREATE VIEW dbo.View1 WITH SCHEMABINDING
AS
select a.id, a.descr
from SERVER.DB.dbo.TABLE as A
GO
I Have this error
Server: Msg 4512, Level 16, State 3, Procedure View1, Line 3
Cannot schema bind view 'dbo.View1' because name
'iservsql1.osderrhh.dbo.pais' is invalid for schema binding. Names
must be in two-part format and an object cannot reference itself.
This query alone works great:
select a.id, a.descr
from SERVER.DB.dbo.TABLE as A
The names aren't what I describe here (id is not valid without []).
ANY IDEAS?!??!?!
I don't know what else can I do.
I need help!!!
TANKS A LOT!!!!!!!!