I need to be able to "flag" a column on a table for special treatment and I am looking for a way to do this.
What I want to do is allow an administrator to somehow mark (flag) a column on a table. Then as part of another process, a script would scan all the columns in a database, looking for this flag, and take action based upon the data in this column.
This flag has to be applicable to existing, third-party databases, databases over which I have no control as to column names, or data types.
Ideally, I'd like to have some user-defined property of a column which would allow me to mark columns for use by my program. Does something like this exist.
The best solution I have come up with, so far, is to create a rule, which passes everything (LIKE '%'). By looking for the presence, or absence, of this rule, on a column, I have been able to flag columns.
I'd like to know, however, if there is a cleaner solution.
Thanks.
KenYou could create a seperate table with 2 columns:
tablename
columnname
Which lists the columns that have been flagged and in which table. The admin function can insert a record into this table and then during processing remove the record.
Showing posts with label flag. Show all posts
Showing posts with label flag. Show all posts
Monday, March 19, 2012
Subscribe to:
Posts (Atom)