10 Replies Latest reply: Jan 18, 2013 11:03 AM by sb92075 RSS

    SQL statement not working for an application

    959313
      Hello,
      Here is a sql statement which i am using to populate Department ID using another row in the table. Using these I am getting the values called department alias from different table and schema.

      UPDATE tablename_4127 PT
      SET "Deptid" = (select distinct(deptid) from datastore.get_department_alias
      where upper(ltrim(rtrim(deptalias))) = upper(ltrim(rtrim(PT."Dept Descr")))
      AND "Colid" = PT.COLID)

      Please anyone help me with this.
      Thank you