Strange situation

Last Post 24 Feb 2011 05:01 AM by gunneyk. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
river1
New Member
New Member

--
22 Feb 2011 08:37 AM

Hi,

I received a database which as a view.

This view as the following code:

SELECT TOP (100) PERCENT rf.repf_id, p.prov_id, p.prov_num, p.prov_dsg, rf.repf_num_rf, rf.repf_dsg, rf.repf_num_rf + '-' + rf.repf_dsg AS RFNumDsg,
dbo.tbl_Base_RepFiscalAux.rfaux_nivel, dbo.tbl_Base_TipoServicoFiscal.tpsf_id, dbo.tbl_Base_TipoServicoFiscal.tpsf_abrev,
dbo.tbl_Base_TipoServicoFiscal.tpsf_dsg
FROM dbo.tbl_Base_TipoServicoFiscal RIGHT OUTER JOIN
dbo.tbl_Base_RepFiscalAux ON dbo.tbl_Base_TipoServicoFiscal.tpsf_id = dbo.tbl_Base_RepFiscalAux.rfaux_tpsf_id RIGHT OUTER JOIN
dbo.tbl_Base_Provincia AS p RIGHT OUTER JOIN
(SELECT repf_id, repf_prov_id, repf_num_rf, repf_dsg
FROM dbo.tbl_Base_RepFiscal
UNION
SELECT 0 AS repf_id, 0 AS repf_prov_id, '----' AS repf_num_rf, ' Seleccione o Serviço' AS repf_dsg) AS rf ON p.prov_id = rf.repf_prov_id ON
dbo.tbl_Base_RepFiscalAux.rfaux_num_rf = rf.repf_num_rf
ORDER BY p.prov_num, rf.repf_num_rf


Then i try to execute this view on my server, SQL Server 2005 (MS) tell's me that it can not find the server nwsrv2 in sys.servers....

I am runing this query in my server. In the SQL statement i don't see any reference to a server.

How can this happen?

Thank you

russellb
New Member
New Member

--
22 Feb 2011 09:44 AM
Check if any of:

dbo.tbl_Base_TipoServicoFiscal
dbo.tbl_Base_RepFiscalAux
dbo.tbl_Base_Provincia
dbo.tbl_Base_RepFiscal

Are views or synonyms that reference a remote server
river1
New Member
New Member

--
22 Feb 2011 11:09 PM
Thank you very much master russellb. They are views.....
russellb
New Member
New Member

--
23 Feb 2011 11:53 AM
I hate "tbl" prefixes
gunneyk
New Member
New Member

--
24 Feb 2011 05:01 AM
Me too
You are not authorized to post a reply.

Acceptable Use Policy