J
jelling
Hi,
Is it possible to use a CASE or IF ELSE statement in a datacolumn
expression?
Here's what I've tried:
'standardCodeColumn.Expression = "CASE StandardsBodyID
WHEN 1 THEN 'JCAHO' ELSE 'Non-JCAHO' END"
'standardCodeColumn.Expression = "CASE WHEN
StandardsBodyID = 1 THEN 'JCAHO' ELSE 'Non-JCAHO' END"
But I keep getting errors like this:
Syntax error: Missing operand after 'StandardsBodyID' operator
Please help if you can. I know we can do this at the SQL View level
but its a requirement in this case to move that logic to the BLL/DAL
layer.
Thank you,
..jelling
Is it possible to use a CASE or IF ELSE statement in a datacolumn
expression?
Here's what I've tried:
'standardCodeColumn.Expression = "CASE StandardsBodyID
WHEN 1 THEN 'JCAHO' ELSE 'Non-JCAHO' END"
'standardCodeColumn.Expression = "CASE WHEN
StandardsBodyID = 1 THEN 'JCAHO' ELSE 'Non-JCAHO' END"
But I keep getting errors like this:
Syntax error: Missing operand after 'StandardsBodyID' operator
Please help if you can. I know we can do this at the SQL View level
but its a requirement in this case to move that logic to the BLL/DAL
layer.
Thank you,
..jelling