May 14, 2015 at 10:04 am
Please see attached. We were able to successfully create a link.
I am having a hard time writing a "Select top 100 * FROM ???? "
Help me with the syntax please ( You may use any table shown in the catalog ) The catalog that you see is from a linked server.
Thanks
May 14, 2015 at 10:12 am
mw112009 (5/14/2015)
Please see attached. We were able to successfully create a link.
I am having a hard time writing a "Select top 100 * FROM ???? "
Help me with the syntax please ( You may use any table shown in the catalog ) The catalog that you see is from a linked server.
Thanks
select top (100) * from <linkedserver>.<database>.<schema>.<table>;
May 14, 2015 at 10:32 am
no did not work.. Since this was an link to an Oracle database.
However I found it while googling...
Select top 100 * FROM CDRQ_Moderage..[CDR].[EEG_TEXT_T]
This works! 🙂 GOT TO HAVE 2 dots after the LINKED SERVER NAME
May 14, 2015 at 11:04 am
mw112009 (5/14/2015)
no did not work.. Since this was an link to an Oracle database.However I found it while googling...
Select top 100 * FROM CDRQ_Moderage..[CDR].[EEG_TEXT_T]
This works! 🙂 GOT TO HAVE 2 dots after the LINKED SERVER NAME
Sorry, didn't know that the linked server was to an Oracle database.
May 14, 2015 at 1:27 pm
mw112009 (5/14/2015)
no did not work.. Since this was an link to an Oracle database.However I found it while googling...
Select top 100 * FROM CDRQ_Moderage..[CDR].[EEG_TEXT_T]
This works! 🙂 GOT TO HAVE 2 dots after the LINKED SERVER NAME
Really, REALLY bad idea to use 3 or 4 part naming conventions in code because linked server names can change. Instead, make a 2 part named synonym that point to the 3 or 4 part named object and use the 2 part name in your code.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 14, 2015 at 1:29 pm
Jeff Moden (5/14/2015)
mw112009 (5/14/2015)
no did not work.. Since this was an link to an Oracle database.However I found it while googling...
Select top 100 * FROM CDRQ_Moderage..[CDR].[EEG_TEXT_T]
This works! 🙂 GOT TO HAVE 2 dots after the LINKED SERVER NAME
Really, REALLY bad idea to use 3 or 4 part naming conventions in code because linked server names can change. Instead, make a 2 part named synonym that point to the 3 or 4 part named object and use the 2 part name in your code.
Actually, this is a really, really good idea.
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply