Link to home
Start Free TrialLog in
Avatar of wally_davis
wally_davisFlag for United States of America

asked on

Need to send a list of workstations to a SQL SP / its variable, but need to remove /r/n

I'm testing a list of workstations that will be sent as comma delimited to a SQL 2005 SP whereby the @Workstation variable will receive this list.
I went to copy and past some workstations from an Excel sheet and when I went to add this list to the Properties/Debug/Command line arguments box, and went to store them in an array,
I noticed that the workstations in the arrary were being list like this:
B001617259BA7,\r\nB001E371E21B2,\r\nB001422C95811,\r\nB001C25100C31,\r\nB001422D9BE9B,\r\nB00217091E3A0,etc. What methods are there to remove the Newline \r\n Escape sequence characters before adding them into VS 2008 for Debug testing or when sent to the SP?
Thanks for your help Experts,
Wally
[0] = "B001617259BA7,\r\nB001E371E21B2,\r\nB001422C95811,\r\nB001C25100C31,\r\nB001422D9BE9B,\r\nB00217091E3A0,\r\nB0015605A5819,\r\nB00163666A181,\r\nB0021709A9EF8,\r\nB001C23525C6B,\r\nB00188BD375BF,\r\nB0016179FBF81,\r\nB001C25143F9D,\r\nB0014C2CA6C1F,\r\nB001...

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wally_davis

ASKER

That was perfect Fernando. I guess I need to review all the string methods. :)
Glad I was able to help.  ;=)