home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,533 of 19,505   
   DaveL to Plamen Ratchev   
   Re: Sys objects   
   25 Jun 09 09:18:04   
   
   From: dvs_bis@sbcglobal.net   
      
   this works fine if the Database name is a Literal   
      
   because im trying to make a Genric proc...i have to make dynamic sql   
   and im trying to Stay away from that   
      
   is there a way to make the below work without making it completly Dynamic   
      
   DAveL   
      
      
   "Plamen Ratchev"  wrote in message   
   news:JtSdnbOPxLTfH9zXnZ2dnUVZ_hRi4p2d@speakeasy.net...   
   > You can just prefix the objects with the correct database name:   
   >   
   > SELECT *   
   > FROM Database.sys.objects   
   > WHERE object_id = OBJECT_ID(N'[Database].[dbo].[Partients]')   
   >   AND type = 'V';   
   >   
   > --   
   > Plamen Ratchev   
   > http://www.SQLStudio.com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca