Need Help

  • I have a column GracePeriod with check constraint, values 1,3,6,9,12

    From Application side development team want to display these values in drop down box(list box)

    I need to write a procedure which gives above value

    can any one help how to get values from this check constraint

  • You can query the system table sys.check_constraints to get the definition. You would then have to parse out the result to get what you wanted in list format.

    SELECT definition

    FROM sys.check_constraints c

    WHERE c.TYPE = 'c'

    AND c.parent_object_id = OBJECT_ID('dbo.yourTable')

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply