How do you get the object_id of a table or any objeect on another server dynamically ?
I have tried :
It returns NULL.
When i try to get the id without the use of variables ie.
The query still returns NULL.
I am executing it in a query in a stored procedure in the following way :
select "Database Version"= syp_value, "Total Attendances" = rows
FROM servername.database.owner.systemproperties, servername.database.owner.sysindexes
where id = OBJECT_ID("servername.database.owner.Attendance_details")
AND indid < 2
AND syp_type = "Database Version"
Thanks in advance.
Edited by - pattikay on 08/02/2001 04:33:40 AM