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 |
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-05-18 : 04:10:49
|
Hi Guys, I’m trying to find out if there is a method that I can use to extract the Abtext columns into separate columns, see the current table example belowID AbText 1775780 <B>Purpose</B> – Test data 1. <B>Design</B> Test Data 2 <B>Findings</B> – Test data 3And im trying to get the information into separate columns i.e.ID Purpose Design Findings1775780 Test Data 1 Test data 2 Test Data 3Is there ways of doing something like this, I’ve been looking at using Patindex but can’t seem to get the correct results.Cheers in advance guys |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2009-05-18 : 05:38:12
|
anyone - or am i best off looking down the patindex route |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-05-18 : 07:12:52
|
you could export the data to a flat file ( using REPLACE to switch the <B>Findings</B> to a 1 character delimiter (try pipe |) and then use import tolls to put it back into your database.Do you know how many columns you are going to end up with or do you need a completely dynamic approach?Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
|
|
|