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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Synonyms in SQL Server 2000

Author  Topic 

cjpsx
Starting Member

34 Posts

Posted - 2006-06-27 : 09:40:25
Is it possible to create and use synonyms in SQL Server 2000?

The following code has invalid syntax near 'SYNONYM':

CREATE SYNONYM pb_arinvoice
FOR pd_infosys.dbo.arinvoice

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-06-27 : 09:46:20
[code]SELECT MySynonym.*
FROM pd_infosys.dbo.arinvoice AS MySynonym
JOIN AnotherTable at ON at.SomeColumn = MySynonym.FirstColumn[/code]
Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-27 : 09:49:46
You have to create View

Create View pb_arinvoice
as
Your select query

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

cjpsx
Starting Member

34 Posts

Posted - 2006-06-27 : 09:51:14
I can't use the CREATE statement? I want to avoid the use of pd_infosys.dbo.arinvoice.
Go to Top of Page
   

- Advertisement -