This discussion is archived
10 Replies Latest reply: Jan 18, 2013 9:00 AM by 959313 RSS

SQL statement not working for an application

959313 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points