6 Replies Latest reply on Oct 20, 2010 5:55 AM by S.Q. R

    Teiid Designer: How I can execute the select statement with 'WHERE CLAUSE' of user command

    S.Q. R Newbie

      Dear all,

       

      I want get the all records that will be updated in the update transformation procedure of view model.

       

      If the user command is

      UPDATE viewModel.schemaName.table1 SET column1 = 'xxx' WHERE column2 > 100;
      

       

      In the view model update transformation procedure, I want to execute below SQL:

      SELECT * FROM viewModel.schemaName.table1 WHERE CRITERIA;
      

       

      But, the procedure validation result is :

      The query is not valid.
      Error:  Invalid source table - book.
      Reason: Target cannot be a source to itself.

       

      And "WHERE CRITERIA" without "TRANSLATE" is not allowed.

       

      Will the above query statement be allowed?

      OR, Other way to implement same function?

       

      Thank you!

       

      Best Regards,

      S.Q.