DB name changes daily

From: Tomas (anonymous_at_discussions.microsoft.com)
Date: 05/13/04

  • Next message: Hari: "Re: DB name changes daily"
    Date: Thu, 13 May 2004 14:41:04 -0700
    
    

    Hi,

    I am trying to write SQL automation that runs SQL scripts against the daily drop of the database. Each day, a new DB is created using the format (Testdb + xxxxx )where xxxxx= computed build number. Thus today's db name might be TEST12345 and tomorrow would be Test12346. I have a script that creates the dbname such as Test12345 and when I run it, I get the expected result, but when I try this statement

    Use @dbname
     I get an error.

    Is there a way to introduce a variable with a Use statement so that I can automatically open the latest db?

    Thanks


  • Next message: Hari: "Re: DB name changes daily"