Friday, August 12, 2011

LIKE Operator in X++

In Axapta, we can use the LIKE operator in an inline SQL statement, see the following:


select * from VendTable where VendTable.Name like 'P*'


Another example is to use the LIKE operator to compare strings!


static void MyTestForLike(Args _args)
{


    str test;
    ;

    test="Eduardo";

    if(test like "Eduar*")
       info('Hello Ed!');


}

1 comment:

  1. if ('' like '*')
    info('alike');
    else
    info('not alike');



    What do you think is displayed in the infolog?

    ReplyDelete

Thank you for your thoughts. Your comment will appear in my blog shortly after review.

Have a great day!