March 3, 2011 at 7:13 pm
I have a column with 2000 character text in a column like repair, need,network etc...I want remove all those and put spaces. I would appreciate for your help
thanks
March 3, 2011 at 8:25 pm
tulasinr (3/3/2011)
I have a column with 2000 character text in a column like repair, need,network etc...I want remove all those and put spaces. I would appreciate for your helpthanks
Have a look at the REPLACE() function.
Something like:
SELECT REPLACE(Col1, ',', ' ')
March 4, 2011 at 10:05 am
I can replace only one text in a column, but I want Replace several text for eg below:
like I want take out need , to ,order keep only USB. That I can do by substring but, I don't know the positions as each row looks different, I want weed out all words which I don't want...
Need to order a USB Mass Storage Device ***
March 4, 2011 at 10:50 am
tulasinr (3/4/2011)
I can replace only one text in a column, but I want Replace several text for eg below:like I want take out need , to ,order keep only USB. That I can do by substring but, I don't know the positions as each row looks different, I want weed out all words which I don't want...
Need to order a USB Mass Storage Device ***
Sorry, but I don't understand.
Could you please paste the DDL for your table, add some sample data and give me an example of the output you would like?
March 4, 2011 at 5:19 pm
Eg: Table
CREATE TABLE #mytable
( Custid int,
worklog nvarchar(max) )
custId worklog
1 I need network and printer set up
2 My scanner is not install working fix it
3 software needs to be installed in my computer
output I need is
CREATE TABLE #outputtable
(
Custid int,
worklog nvarchar(max),
Col1 varchar(50)
col2 varchar(50 )
col3 varchar(50))
col1
network Printer
scannerinstall
sofware computer
col2
network
scanner
sofware
col2
Printer
install
computer
from worklog column, want weed out all the junk take the key words to Col1 from Col1 parse the each word to different columns
hope you understands, Thanks!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply