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 2000 Forums
 SQL Server Development (2000)
 Parsing String contained within brackets and comma separated

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-05 : 09:39:45
Mark writes "Here are examples of what the line of text could look like:

Most will have at least 4 values

[Black,210R,PMSGreen,100]
[122,145,369,214]
[RED032,RHODAMINERED,COOLGRAY8,PROCESSBLUE]

Some will only have 2 values with in the brackets

[3564,458]
[Black,COOLBLUE8]

Each one of the values needs to be parsed from the string and inserted into it's own variable so it can be utilized later in the SProc.

I am a novice to this. I did see a solution to the CSV but was unable to get it to work with the brackets.

Any help would be greatly appreciated.

Thanks,

Mark"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-06-05 : 09:57:53
just perform the csv logic you where reading about on the string after stripping off the brackets . . . or modify the csv logic to start at character #2 and stop at character len(string) - 1 . . .

<O>
Go to Top of Page
   

- Advertisement -