Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Parsing delimited fields

Author  Topic 

ProEdge
Yak Posting Veteran

64 Posts

Posted - 2007-07-19 : 13:09:41
Hello everyone,
I'm using extended properties in my SQL 2005 database. I've come across something I've never had to do because quite frankly I don't believe it should be done in the first place. However, I guess there are always exceptions. In this case, I'm assigning multiple values to an extended property I'm assigning to a table. For example: TableA with ext. property 'MS_Description' and values 1, 2, 3, 4, etc... Of course I could create multiple extended properties for each value I need which does make sense. However, I do have a lot for each table and it can become cumbersome. Another way I could assign is it place the entire set of values, delimited with a carriage return. The GUI in Mgmt Studio allows you to do this in the properties of a table/column. Now the problem is that I've never had to parse out values from a record. In this case, if I query the correct system tables, I return for my extended properties something like this:

name value
---- -----
TableA 1 2 3 4 5 6 (etc...)

I'm thinking I may need to use a cursor but I thought I'd ask here first to see if anyone had a faster method to parse this out into a row based format, example:

TableA 1
TableA 2
TableA 3

Any help is appreciated. Thanks!

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-07-19 : 15:56:12
Can I ask why are you putting data in the extended properties of a table? Why aren't you putting data in actual table? What do these values represent?

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -