Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. If you know how, follow ISO-11179 data element naming
conventions and formatting rules. Sample data is also a good idea,
along with clear specifications. It is very hard to debug code when
you do not let us see it.
What you did post used #, which will screw up your data dictionary
when you try to put that data element name on the Internet,
"description" of what? etc.
Then you never finished asking a question in the posting. This is too
vague to be considered seriously.
If you want to learn how to ask a question on a Newsgroup, look at:
http://www.catb.org/~esr/faqs/smart-questions.html