Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT INSERT Across Different Servers
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01443996
Message ID:
01444010
Views:
31
>I want to pull data from a table on SMAP001. I'm in server SMIT001. I have created a linked server to SMAP001
>
>I have this so far
>
>
>	SELECT	smap001.PK5.PD.PD_IMKEY AS Item,
>			Min(smap001.PK5.PD_PREF) AS MinOfPD_PREF
>		FROM PD
>		GROUP BY PK51PD.PD_IMKE
>
>
>
>
>I'm getting "Invalid object name 'smap001.PK5.PD'."

You should use full syntax to get DB:
	SELECT	PD.PD_IMKEY AS Item,
		Min(PD.PD_PREF) AS MinOfPD_PREF
        FROM smap001.PK5.SchemaHere.PD PD
	GROUP BY PD.PD_IMKE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform