April 22, 2003 at 4:34 am
Hi everyone,
I am trying to see if a table exists on a linked server, I have tried using the INFORMATION_SCHEMA.TABLES view but the path needs to be fully qualified (FQP) and therefore I can only get the master DB's tables. I have also tried using the FQP with the OBJECT_ID() function but had no success there either. IF EXISTS (SELECT * FROM FQP )works fine if you have rows in the table, however this will not always be the case.
I know I can go to the root of the INF_SCHEMA.TABLES view and use the sysobjects table but I am really not happy with this solution as this code is for use in a COTS product.
Any ideas folks?
April 22, 2003 at 5:12 am
Take a look at
sp_tables_ex
in SQL BOL.
April 22, 2003 at 5:58 am
Thanks, that does the job nicely.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy