AnsweredAssumed Answered

Native Sql Query error

Question asked by vito16 on Mar 6, 2014
Latest reply on Mar 7, 2014 by liowbot
Im need query user task list  and with some variable what link this task.
when i running following sql :

SELECT
t.ID_,
t.REV_,
t.EXECUTION_ID_,
t.PROC_INST_ID_,
t.PROC_DEF_ID_,
t.NAME_,
va1.TEXT_,
va2.TEXT_
FROM
dbo.ACT_RU_TASK AS t
INNER JOIN dbo.ACT_RU_EXECUTION AS e ON t.EXECUTION_ID_ = e.ID_
INNER JOIN dbo.ACT_RU_VARIABLE AS va1 ON va1.EXECUTION_ID_ = t.EXECUTION_ID_
INNER JOIN dbo.ACT_RU_VARIABLE AS va2 ON va2.EXECUTION_ID_ = t.EXECUTION_ID_
INNER JOIN dbo.ACT_RU_IDENTITYLINK AS idlink ON idlink.TASK_ID_ = t.ID_
WHERE
idlink.USER_ID_ = 3 AND
va1.NAME_ = 'companyID' AND
va2.NAME_ = 'processType'

im getting this error:
<code>
[Err] 22018 - [SQL Server]Conversion failed when converting the nvarchar value 'Order' to data type int.
<code>

Outcomes