Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Extended Column attributes Expand / Collapse
Author
Message
Posted Saturday, November 1, 2008 8:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 27, 2013 7:04 PM
Points: 7, Visits: 26
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
Post #595449
Posted Saturday, November 1, 2008 8:52 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
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.


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #595451
Posted Saturday, November 1, 2008 10:45 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 3:41 PM
Points: 1,887, Visits: 18,572
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

regards Graham


__________________________________________________________________
you can lead a user to data....but you cannot make them think !
__________________________________________________________________
Post #595465
Posted Saturday, November 1, 2008 7:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 27, 2013 7:04 PM
Points: 7, Visits: 26
Graham,

Yes, I have some predefined where clauses stored in tables
Post #595502
Posted Saturday, November 1, 2008 8:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 27, 2013 7:04 PM
Points: 7, Visits: 26
RBarryYoung,

Exactly what I needed. Thanks for your HELP !
Post #595503
Posted Saturday, November 1, 2008 9:19 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
Glad I could help!

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #595509
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse