ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Embedded SQL Woes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Embedded SQL Woes

    EXEC SQL
    SELECT NAMECS, B287CS, IRS#CS into :CUSNAM, :OFFC, IRS#
    from CUSTHEAD where CUS#CS = :CUSNUM and B287CS = :OFFC2;

    SO.. I have the above snippet of code that for whatever reason returns an error code of -206. (Can't resolve a table or field name) However when I run the exact same query directly I get 1 row result I expect.

    Help? Advise?

  • #2
    Re: Embedded SQL Woes

    Seems like you are missing a colon ( : ) in "....into :CUSNAM, :OFFC, IRS#...." for IRS#. That might be the issue.

    Comment


    • #3
      Re: Embedded SQL Woes

      You are exactly right. I noticed this about an hour after I posted this but my post was still being moderated so I couldn't delete it or respond with a oh, nevermind. But thank you very much for replying and pointing it out for me

      Comment


      • #4
        Re: Embedded SQL Woes

        You are exactly right. I noticed this about an hour after I posted this but my post was still being moderated so I couldn't delete it or respond with a oh, nevermind. But thank you very much for replying and pointing it out for me

        Comment

        Working...
        X