Skip to Content

If then Condition In bods

Hi All,

How to check if then condition in Bods.i need to check only one condition no need to check else condition.

if any one knows pls let me know.

ex:if(x(' '),'Y') no need of else condition.

Thanks.

Priyanka

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Mar 12, 2014 at 09:44 AM

    Hi Priyanka,

    In BODS ifthenelse function or decode function expect three input parameters which are Conditional expression, Then Expression and Else expression. If your requirement is not the handle the else part in the expression then you should simply pass blank or NULL as third input parameter which will give you the same result.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 12, 2014 at 11:56 AM

    Hi Priyanka,

    In BODS Ifthenelse function it checks for a condition ,it its true assigns a value if it fails assign another value. As you asked that you do not need else condition actually there will not be another condition.

    Its like this if (condition)

    then- assing value for true condition value

    else-assign value for false conditon value.

    This is the process.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 12, 2016 at 11:11 AM

    Hi ,

    How can i handle multiple cases for a single column ?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 12, 2016 at 01:45 PM

    Thank you All...

    Can you tell me the Equivalennt function for 'locate' in Data Services.

    For Instance , in the above query

    decode(Column like '%xyz' , substr(Column,locate(Column,'xyz')+2),

    Column like '%yuva' , 'Pravi',

    'All')

    Need to check 'Column' having 'xyz' ,

    ON success ,

    it maps to the string, after 2 digits of xyz from Column.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 30, 2016 at 10:09 AM

    Thanks u all ,

    I have done the above by using decode ,substr & Index functions,

    decode(Column like '%xyz%',substr(Column ,INDEX(Column ,'xyz',1)+2,30),

    Column like '%ABC%','DEF',

    Column like '%GHI%','JKLM',

    'Thnks')

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.