|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Hi, I am looking for some help on an application that I am developing.
What I am trying to accomplish is to change the sortorder column from 1 to 9 and then have all the other sort records update themselves. IE. 1 becomes 9, 2 becomes 1, 3 becomes 2,....., 9 becomes 10, 10 becomes 11, etc... Any help would be appreciated!!!!! |
|
#2
|
||||
|
||||
|
very sketchy description, not sure i understand
might have helped if you could say what it's for Code:
select foo
, bar
from yourtable
order
by case
when sortfield=1 then 9
when sortfield<9 then sortfield-1
when sortfield>8 then sortfield+1
end
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Swap Sort Order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|