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 |
|
shemayb
Posting Yak Master
159 Posts |
Posted - 2007-06-13 : 02:07:11
|
| is this correct?(where clause only)where budget = case when price > 2.0 then 'True' else 'False' endFunnyfrog |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-13 : 02:22:30
|
| yes, if the budget stores the string information.--------------------------------------------------S.Ahamed |
 |
|
|
shemayb
Posting Yak Master
159 Posts |
Posted - 2007-06-13 : 02:42:57
|
| How about storing a date? is this the right way?where TransferDate=Case when TransferDate > EndDate then EndDate else TransferDate endFunnyfrog |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-13 : 03:11:39
|
| Post some sample data and required output you want.--------------------------------------------------S.Ahamed |
 |
|
|
shemayb
Posting Yak Master
159 Posts |
Posted - 2007-06-13 : 03:30:15
|
| for example: Transferdate is (YYYY-MM-DD format)2006-10-01 and enddate is 2006-09-12. if transferdate is > enddate,transferdate should be equal to endate.Funnyfrog |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-13 : 03:46:15
|
| You can use it...Always try it then only u can see the difference....--------------------------------------------------S.Ahamed |
 |
|
|
shemayb
Posting Yak Master
159 Posts |
Posted - 2007-06-13 : 03:49:50
|
| thank you..Funnyfrog |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-13 : 08:31:00
|
| Also read about CASE expression in sql server help file for more informationsMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|