View Single Post
  #2  
Old 10-29-2012, 02:44 PM
raghuk raghuk is online now
Registered User
 
Join Date: 02-10-2012
Posts: 11
Quote:
Originally Posted by raghuk View Post
Hello,

I have a need to set a local variable macro based on if the database exists or not.

I have the following query in "Run SQL" action.

if db_id('%CurrentDatabaseName%') is null
BEGIN
-- ???? STEP TO set local variable which effectively says 'NO DB'
END

How can I achieve this?

Thanks!
In fact, if there is an "expression" that I could use to call this I would love that so that I can use the expression in "Build only if macro or expression" is true!

Thank you!
Reply With Quote