SQL CASE Support

Posts   
 
    
smurrell
User
Posts: 59
Joined: 22-Feb-2007
# Posted on: 09-Mar-2007 20:36:35   

Hello

How would I generate a field which allow me to specify a SQL CASE statement.

e.g.

(
CASE tblTable.Field
       WHEN 1 THEN
               'Active'
       ELSE
               'Active'
END
)

Regards, Simon

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 09-Mar-2007 20:46:32   

I don't think LLBL supports case statements out of the box. this is syntax specific to SQL Server. You may be able to use IExpression to create a custom field which will do this. However it's usually better to execute logic within the business layer, no the database.