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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Decode For Sql Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-09 : 00:45:43
Hemen writes "I have a field in my table->q1
Values In q1 range from 5 to 100

I have another field q2 which i would like to update based on q1

q2=if q1>5 and q1<40 then q2=1,if q1>=40 and q1<60 then q2=2...and so on.

How do i do this through a sql query. I am using sql server 7.


Thanks...Hemen"
   

- Advertisement -