Skip to main content

String functions in MACRO SQL()

Answered

Comments

3 comments

  • Official comment
    Yaremi Miranda Lopez

    Hello Scott,

     

    The supported SQL command supported should be the same as what SAP can run in the SAP query-manager.

  • Scott McClure

    Yes, I see that this is the case.  However, I need to re-work my question.  I am trying to detect the presence of an apostrophe embedded in a field and take action based on that.  While I can "escape" the character in Query manager (and SQL query analyzer) all my attempts in a macro have failed.  Functions work with other characters but when the apostrophe is encountered it is treated as an unbalanced quote.  I can see it well enough to display it in a message as a single character but cannot compare it directly and cannot get it to compare to CHAR(39).

    Can you provide any tip to help with this?  There must be a way!

  • Scott McClure

    For what it's worth, found that s @STORE var worked differently than a field referred to by dynamic syntax.  When I replaced '@STORE3' which had been set to $[$7.0.0] (CardName on Business Partner) with simply $[$7.0.0] all worked.

    There are just a lot of syntax engines in play - hard to get them all aligned.

Please sign in to leave a comment.