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 |
Vadz
Starting Member
11 Posts |
Posted - 2012-12-12 : 20:42:00
|
hii have this valuetom = 100Ken =50those to value a my constant value. so when i enter a value greater than both it will return enter another value.i am asking how to do sql query to have a constant value thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-14 : 04:09:00
|
use CASE WHENCASE YourFieldWHEN 'tom' THEN 100WHEN 'Ken' THEN 50ELSE <other value here>END AS yourColName------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|