November 8, 2011 at 7:09 pm
I'm trying to split a columns' content (String) into 3 part each will go to a new column.
Example of the string (This part is usually text/S2/C2).
The Columns will be called:
"Product Name" = This part is usually text
"SlotNumber" = S2
"CarouselNumber" = C2
I'm facing 3 problems:
1. The part before the "/S" can vary in the length of Characters.
2. The part after the "/S" can be 1, 2 or 3 digits (S16, S264, etc.)
3. The column can be empty or missing one or two of the 3 parts.
Can anyone help me please?
Let me know if you need more clarification.
Thanks
November 8, 2011 at 7:11 pm
What character is separating the data in this field? In other worlds, what character denotes the separation of text, s2 and c2?
Is it always the same character?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
November 8, 2011 at 7:15 pm
Since I only need the numbers that follows the S and C then I would guess this would be the seperator:
"SlotNumber" = '/S'
"CarouselNumber" = '/C'
November 8, 2011 at 7:19 pm
Here are some actual examples in what can be in the column:
MW3 Trailer/S2/C1
/S255
my apps/S1
Or empty column (This column nullable)
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply