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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-07-08 : 07:24:57
|
| Rudi writes "Parsing one Column with delimiter into multiple columns I am exporting a database into a coma delimited file. This is what I have.select Link,outlookusername as Author,Typist,Date,Correspondence.Caseidas Caseid,"Acct#" as client,"File #" as matter from Correspondence inner join casetable on casetable.caseid = Correspondence.Caseid inner join "user table" on "user table"."user" = Correspondence.author and docid IS NULLThe problem is I need to split a column into 2 columns. The link column has a delimiter in each row it is the ‘#’.The results of each row in the link column looks something like this.“Test document#\\DC\documents\document.doc” as you can probably tell it refers to the document name and its location. I need to split this into docname and doclocation columns. " |
|
|
iminore
Posting Yak Master
141 Posts |
Posted - 2005-07-08 : 08:19:57
|
| a combination of CHARINDEX and SUBSTRING will separate the columns. |
 |
|
|
|
|
|