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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Parsing String contained within brackets and comma separated
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 06/05/2002 :  09:39:45  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
2878 Posts

Posted - 06/05/2002 :  09:57:53  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000