December 29, 2015 at 12:32 pm
Please see the highlited line in the attached picture.
Can anyone be kind enough and tell me what they are talking about ?
I have included the table structure for the table in question. But I have no clue as to how to add a description to a field ?
Anyone ?
Create table CODE_MAP_IN
(
[CODE_MAP_FR] [varchar] (53)NOT NULL,
[CODE_MAP_TO] [varchar] (53)NOT NULL,
[FILE_ID] [float]NOT NULL DEFAULT 1000
PRIMARY KEY ([CODE_MAP_FR]),
FOREIGN KEY ([FILE_ID]) REFERENCES FILE_ID_IN([FILE_ID])
) ON [PRIMARY]
December 29, 2015 at 1:01 pm
Maybe they're talking about something like this:
EXEC sp_addextendedproperty
@name = N'Description', @value = 'ICD 10 code type',
@level0type = N'Schema', @level0name = 'dbo',
@level1type = N'Table', @level1name = 'CODE_MAP_IN',
@level2type = N'Column', @level2name = 'CODE_MAP_FR';
Reference: https://technet.microsoft.com/en-us/library/ms180047.aspx
The best option for you is to ask them exactly what are they talking about.
December 29, 2015 at 1:01 pm
Where are you getting the message from? It looks like a custom programmer defined message. The term "ICD10" relates to healthcare coding not SQL Server.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
December 29, 2015 at 1:13 pm
Yep ! I am in the HEALTHCARE business and have been told by another organization to include the changes.
December 29, 2015 at 1:15 pm
Question for Luis
So what does this segment of code do ?
Can you send me a simple SqL statement on how to retrieve what you just added ?
I mean I am trying to make some sense of what was done here by you
December 29, 2015 at 1:22 pm
It basically adds a value to the Description property of the column. It changes only the metadata of the column for documentation purposes. You could also do it using the table designer.
January 3, 2016 at 1:07 pm
My best (but still pretty wild) guess is that this table holds static data (with healthcare codes??), and that the highlighted line was added by a developer who, as part of a project or small change, added or modified data in this table to reflect a change in a code table.
So just a data change, but for data maintained by the IT organization.
January 4, 2016 at 6:20 pm
If you right click a column in a table, and choose properties >
you will see a node for 'Extended Properties.' Here you define what you want to add to better describe the column in the form of (your property, its value). You can get creative here as to what you want to enter. This can be entered here , or using the sys.sp_addextendedproperty function that Luis has shown.
For Example// former column name | ICD 10 code
but a description is the logical first choice for what to enter as an extended property.
You can also apply extended properties to tables as well, a good way to describe their intended purpose.
----------------------------------------------------
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply