select query on linked server

Amien90
Amien90 used Ask the Experts™
on
SELECT * FROM linkedserver.database.dbo.table

when i do this .. when i execute this .. the query will be rebuild too:

SELECT * FROM linkedserver.database.dbo.table AS newtablename

i dont want that to happen .. i just need the original tablename from the linked server.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Open a query window and write your query.  Not sure where you are seeing this tablename being changed - but a query window won't change it.

Author

Commented:
my bad .. i'm writing this in a view.. building a view

Commented:
Okay, then what is the problem with using an alias for the table name?  This won't cause any issues for your view.
However, using '*' in the view will definitely have problems.  You need to specify the columns you want in the view.
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
the "AS newtablename" just put's an alias to the table for the query.
it will not rename the table as such

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial