2017-07-06 71 views
0

團隊,我正在使用下面的插入查詢將數據插入到表中。但我越來越不知道我在這裏失蹤語法錯誤,Talend - tOralcerow問題

insert into employee (emp_id,dept_id,emp_nm,emp_address,insert_date) 
values(@EMP_ID,(select max(dept_id) + 1 as dept_id from 
department),@EMP_NM,NULL,to_char(sysdate(),」DD-MM-YYYY」)) 

得到錯誤的「tOraclerow - ORA-00936缺少表達」請在這個問題上提供幫助。

基本上我得到的流程中的列直到tOracelrow組件,我需要知道什麼是編碼或過程如何訪問tOraclerow組件內寫入的查詢相同。

+0

您是否嘗試過使用tOracleOutput組件,在表中插入行會更容易? (並且更容易維護) – Corentin

回答

0

在@EMP_ID的地方,請使用您的flowname.EMP_ID

例如:row1.EMP_ID

如果你的列是字符串不是把這個變量的引用也很喜歡

「插入(「+ row1.EMP_ID +」,(選擇max(dept_id)+ 1作爲來自 department的dept_id),'「+ row1.EMP_ID +」',NULL,to_char (sysdate(),「DD-MM-YYYY」))「

希望這會有所幫助..