| Author |
Topic |
|
bhdijkstra
Starting Member
24 Posts |
Posted - 2011-04-29 : 05:20:16
|
| CASE WHEN Type xxx THEN StartDateActual WHEN Type ('xx, xx, xx') THEN StartDate END is not working.Execute error: Conversion failed when converting the varchar value 'xx, xx' to data type int.When this is complete I can choose this new name as a parameter in my report. Anyone any idea to create a working CASE? |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-29 : 05:21:53
|
| Post some dummy dataRaghu' S |
 |
|
|
bhdijkstra
Starting Member
24 Posts |
Posted - 2011-04-29 : 05:24:02
|
| CASE WHEN TYPE = 3113 THEN StartDateActual WHEN TYPE IN ('10; 13') THEN StartDate END |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-04-29 : 05:26:23
|
IN(10,13) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-29 : 05:28:07
|
| Try thisCASE WHEN thpe=3113 THEN StartDateActual else CASE WHEN TYPE IN ('10; 13') THEN StartDate END ENDRaghu' S |
 |
|
|
bhdijkstra
Starting Member
24 Posts |
Posted - 2011-04-29 : 05:35:12
|
quote: Originally posted by raghuveer125 Try thisCASE WHEN thpe=3113 THEN StartDateActual else CASE WHEN TYPE IN ('10; 13') THEN StartDate END ENDRaghu' S
same error |
 |
|
|
bhdijkstra
Starting Member
24 Posts |
Posted - 2011-04-29 : 05:36:08
|
quote: Originally posted by webfred IN(10,13) No, you're never too old to Yak'n'Roll if you're too young to die.
same error |
 |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-29 : 05:37:04
|
| REPLACE TYPE IN ('10;13) TO TYPE IN (10,13)--THIS IS YOUR INT DATA TYPE NO.Raghu' S |
 |
|
|
bhdijkstra
Starting Member
24 Posts |
Posted - 2011-04-29 : 05:53:19
|
| yes, thanks this is working. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-04-29 : 05:57:00
|
That's nothing other than I've posted... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-29 : 05:59:41
|
| Yes i did not see. Thank You WebfredRaghu' S |
 |
|
|
|