I would like to know how to move a row entry up or down in sql server depending on the value on the column to its left. For instance, this is my table:
nodetype localname text
1 events NULL
1 event NULL
2 id NULL
3 #text 21515
2 side NULL
3 #text Away
2 type NULL
3 #text Goal
1 result NULL
3 #text <b>Robin Van Persie</b>Goal
Anything with #text from column 'localname' I wish to move the row entry from column 'text' up by one. So 'id' corresponds to 21515, 'side' = Away, 'type' = Goal and 'result' = Robin Van Persie Goal . I'm not sure of the query to modify the table...
No comments:
Post a Comment