sql server - SQL Data tools - Run post-deployment script with conditionals -
i'm working database projecto deploy databases using "data pack"
i've set paramenter "client", depending client i'll run different set of scripts.
i tried different options, nothing worked.
i've checked out conditional logic in postdeployment.sql script using sqlcmd no luck
if '$(client)' = 'a' :r .\generalparams\s01.sql :r .\clients\a\a01.sql go if '$(client)' = 'b' :r .\generalparams\r01.sql :r .\clients\b\b01.sql
inside every external scripts there more 1 go when see output file executed, it´s compiling external files one.
does know way overcome o beautiful workaround
i tried option:
if '$(client)' = 'a' :r .\generalparams\s01.sql if '$(client)' = 'a' :r .\clients\a\a01.sql go if '$(client)' = 'b' :r .\generalparams\r01.sql if '$(client)' = 'b' :r .\clients\b\b01.sql
but r01 has more 1 go , exits if clause
Comments
Post a Comment