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 |
|
starnold
Yak Posting Veteran
83 Posts |
Posted - 2008-10-29 : 06:08:46
|
| I have the below data in a table within SQL 2005:ID System KEY Value 1 miv3demo Discoverer_CoreOptions Selection,Cube,ChartWhat I would like to do is write a query to transform it so that it looks like:ID System KEY Value 1 miv3demo Discoverer_CoreOptions Selection1 miv3demo Discoverer_CoreOptions Cube1 miv3demo Discoverer_CoreOptions ChartIs there a way to do this? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 06:15:08
|
| [code]SELECT t.ID, t.System, t.KEY, tmp.ValFROM YourTable tCROSS APPLY dbo.ParseValues(t.Value)tmp[/code]ParseValues can be found herehttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111986 |
 |
|
|
starnold
Yak Posting Veteran
83 Posts |
Posted - 2008-10-29 : 06:16:34
|
| I have tried this before but it never works on SQL 2005 =( |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 06:24:09
|
| it works if you've compatibility level set to 90 |
 |
|
|
starnold
Yak Posting Veteran
83 Posts |
Posted - 2008-10-29 : 06:28:18
|
| Is there a way to write the script to make the DB think it has its compatibility level set to 90 without having to actually change it? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 06:32:14
|
quote: Originally posted by starnold Is there a way to write the script to make the DB think it has its compatibility level set to 90 without having to actually change it?
nope. you have to change it before using this. you can use sp_dbcmptlevel system stored procedure to change compatibility levelhttp://msdn.microsoft.com/en-us/library/ms178653.aspx |
 |
|
|
|
|
|