Skip to main content

Derive ItmsGrpCod by looking up Group Name in Integration Hub

Answered

Comments

3 comments

  • Ok looked at the example screenshot properly and are now determining the correct substitution value. 

    But need help returning the SQL value rather than the SQL Command.  I have setup the following conversion formula which is substituting in the correct value for Item Group Name but is not executing the SQL Command and returning the result.

    setvar=value=sqlexecute=SELECT ItmsGrpCod FROM OITB WHERE ItmsGrpNam = '<import.ItemGroup>'

  • Martin Heigl

    Hi,

    correct is

    sql=SELECT "ItmsGrpCod" into "Value" FROM "OITB" WHERE "ItmsGrpNam" = '<import.ItemGroup>'

     

  • Hi Martin,

    Thank you for the reply.  It has led me to a working solution.

    I received the following error when trying to set the "Value" directly in SQL.

    () Error in sql statement: (-1) SQLSTATE = S0001 [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'Value' in the database./2714: SELECT "ItmsGrpCod" into "Value" FROM "OITB" WHERE "ItmsGrpNam" = 'Boats'

    But I found the following did work...

    Cheers,

    Sean

Please sign in to leave a comment.