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

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
-- ???? STEP TO set local variable which effectively says 'NO DB'

How can I achieve this?

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