Question of Column Descriptions again???

  • I did a search on column descriptions. I found info on how to extract them using a query and insert them using Enterprise Manager.

    I'm only interested in inserting them. But not in Enterprise Manager but using the T-SQL statements in Query Analyzer. I would like to include them in the scripts.

    Is there a way to insert them using the Create Table statement syntax? The tables have not been created yet.  I would like to do it all at once but if that is not possible is there another way. As a last result i guess i will use Enterprise Manager.

    Thanks!

  • Column Descriptions shown in enterprise manager are extended properties.

    they are handled separately, There is no way to put the description in using the Create table syntax. At least not that I am aware of.

    http://www.windowsitpro.com/Article/ArticleID/21705/21705.html?Ad=1

     

  • I didn't check the link, but this might give you what you need :

    Create table...

    GO

    exec sp_addextendedproperty N'MS_Description', N'This table must contain ONLY 1 LINE or Facturation.adp.Km (form) will start to fail', N'user', N'dbo', N'table', N'FraisDeplacement'

    That's the only (legal) way I know.

  • Thanks guys! Based on the information you guys provided, i was able to find this info on msdn.com that might be helpful.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_08_7qb7.asp

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ua-uz_91k9.asp

  • Jacob,

    Great articles, I have them book-marked now, as this question comes up everywhere and about every couple months!  I was just about to post some code for you as well, but decided to look at the articles first, and they have pretty much what I would have posted word for word

    I went through this exact question not that long ago, but couldn't locate articles of this caliber... they must be newer.  I have certainly noticed that the quality of "help" and information has improved greatly on MSDN (with the .NET stuff coming out really).  Clearly MS is listening to our requests and needs for better and more detailed documentation and information for developers, etc... MSDN blows BOL out of the water any day!

    Good luck with your DB adventures.

    Michelle/Dolphin.

    "Work like you don't need the money;
    dance like no one is watching;
    sing like no one is listening;
    love like you've never been hurt;
    and live every day as if it were your last."
    ~ an old Irish proverb

Viewing 5 posts - 1 through 4 (of 4 total)

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