Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can openquery can use in view ?
Message
 
 
To
12/03/2003 02:27:59
Stanley Yip
Shun Sang (technology) ltd Hong Kong
Hong Kong, Hong Kong
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00764642
Message ID:
00764733
Views:
28
>I have try to use linking server to link the remote server to get access for the table .
>I use openquery command to get the data from the linked server . it is work fine.
>but I use the openquery to create view I find that it prompt error.
>
>so is it prossible to make a view with one local table with the remote sql server table ?
>is there any other solution to solve this problem ?

Yes, it's possible. I just tested it under SQL 2000. Here's my view definition.
CREATE VIEW view_test
AS 
	SELECT sq.pin 
		FROM 
			OPENQUERY(stxq, 'SELECT * FROM stxq') sq
		JOIN DC_pinmaster pm ON pm.pin = sq.pin
'stxq' is linked server to VFP free table and 'DC_pinmaster' is Sql Server table.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform