November 1, 2008 at 8:36 am
I have a system developed using sql 2005. It allows users to develop custom reports by selecting tables , then columns from the tables and I build the SQL statement from thier choices , then execute it.
But, the column names may be short or not user friendlt. Is there is anyway to store text descriptions with you column names. Then I would let the users pick from this list yet build the sql from the actual column name
Richard
November 1, 2008 at 8:52 am
Yes, these are called "Extended Properties" in SQL Server and you can read all about them in Books On-Line. I would suggest starting with the article "Using Extended Properties on Database Objects ".
One tip: as there are other tools that use extended properties in a similar way, you should make sure to distinguish your properties from theirs. I would suggest using some unique prefix as a facility code to represent you application. So instead of calling your description extended property on a column just "Description", call it something like "RCR_Description", where "RCR_" would be your application's unique prefix.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
November 1, 2008 at 10:45 am
Hi Richard
I was interested to read your post because we are considering building a solution that sounds similar to yours.
I have a system developed using sql 2005. It allows users to develop custom reports by selecting tables , then columns from the tables and I build the SQL statement from thier choices , then execute it
How have you ensured that the users select tables that have the correct FK relationships and do not pick tables that cannot be directly joined?
It maybe that SSRS is a better solution for us...but we have no experience with this...yet:unsure:
regards Graham
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
November 1, 2008 at 7:56 pm
Graham,
Yes, I have some predefined where clauses stored in tables
November 1, 2008 at 8:07 pm
RBarryYoung,
Exactly what I needed. Thanks for your HELP !
November 1, 2008 at 9:19 pm
Glad I could help!
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply