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?