I am trying to use domains in my physical modeling (MS SQL 2005) and assign some check constraint rules to them. However, to generate proper DDL scripts, I don’t know how to make the check constraint rule as a “macro” that will generate a proper script for every column where this domain (and the connected rule) will be used.
I create a domain “SurrogateKey” and assign this domain to columns in different tables, like “CompanyId”, “PersonId”. I create a check constraint rule “PositiveNumber” and I apply this rule to my “SurrogateKey” domain. How to write the SQL for this rule so that it will be used for every column?
I tried to find some solutions online. I think in TDM 2 the solution was to use macro %values% and write something like this:
%value% > 0
but this is not working for me in TDM 3.
Is there some kind of a document macro list which can be used in TDM 3?
If I am missing something, please let me know. Thank you for any answer.