ora - 00936失踪expression-select声明

时间:2021-08-30 22:30:03

I have a variable in ssis, with query

我在ssis中有一个变量,带有查询

SELECT     OBS_TYPE_ID, OBS_TYPE_NAME, OBS_UNIT_ID, IS_LEAF, PATH, LEVEL0_NAME, LEVEL1_NAME, LEVEL2_NAME, LEVEL3_NAME, LEVEL4_NAME, 
                      LEVEL5_NAME, LEVEL6_NAME, LEVEL7_NAME, LEVEL8_NAME, LEVEL9_NAME, LEVEL10_NAME, LEVEL0_UNIT_ID, LEVEL1_UNIT_ID, 
                      LEVEL2_UNIT_ID, LEVEL3_UNIT_ID, LEVEL4_UNIT_ID, LEVEL5_UNIT_ID, LEVEL6_UNIT_ID, LEVEL7_UNIT_ID, LEVEL8_UNIT_ID, LEVEL9_UNIT_ID, 
                      LEVEL10_UNIT_ID, HIERARCHY_LEVEL, CREATED_DATE, CREATED_BY, LAST_UPDATED_DATE, LAST_UPDATED_BY
FROM         NIKUREP.NBI_DIM_OBS_V
WHERE LAST_UPDATED_DATE >= TO_CHAR(TO_DATE( @[User::LastModifiedDate] ,'YYYY-MM-DD'),'YYYY-MM-DD')

when my data flow task connects to oracle to execute this i get the ora-00396 missing expression, can someone please help, have been trying to figure this out for 1 week

当我的数据流任务连接到oracle执行此操作时,我得到了ora-00396缺失的表达式,请问有谁可以帮忙,这个问题我已经想了一个星期了

2 个解决方案

#1


2  

On the variables tab click on this variable, and press F4 to show properties Tab.

在variables选项卡上单击该变量,然后按F4显示properties选项卡。

Change Evaluate as Expression to True , and Use the following expression:

将Evaluate as表达式更改为True,并使用以下表达式:

"SELECT     OBS_TYPE_ID, OBS_TYPE_NAME, OBS_UNIT_ID, IS_LEAF, PATH, LEVEL0_NAME, LEVEL1_NAME, LEVEL2_NAME, LEVEL3_NAME, LEVEL4_NAME, 
                  LEVEL5_NAME, LEVEL6_NAME, LEVEL7_NAME, LEVEL8_NAME, LEVEL9_NAME, LEVEL10_NAME, LEVEL0_UNIT_ID, LEVEL1_UNIT_ID, 
                  LEVEL2_UNIT_ID, LEVEL3_UNIT_ID, LEVEL4_UNIT_ID, LEVEL5_UNIT_ID, LEVEL6_UNIT_ID, LEVEL7_UNIT_ID, LEVEL8_UNIT_ID, LEVEL9_UNIT_ID, 
                  LEVEL10_UNIT_ID, HIERARCHY_LEVEL, CREATED_DATE, CREATED_BY, LAST_UPDATED_DATE, LAST_UPDATED_BY
FROM         NIKUREP.NBI_DIM_OBS_V
WHERE LAST_UPDATED_DATE >= TO_CHAR(TO_DATE('" + @[User::LastModifiedDate] + "','YYYY-MM-DD'),'YYYY-MM-DD')"

#2


1  

This maybe be @[User::LastModifiedDate] expression.

这可能是@[User::LastModifiedDate]表达式。

Ensure that your paramater(@[User::LastModifiedDate]) is between Single quotes.

确保您的参数(@[User::LastModifiedDate])位于单引号之间。

Change your expression or try this

改变你的表情或者试试这个

...

WHERE LAST_UPDATED_DATE >= TO_CHAR(TO_DATE( '''' || @[User::LastModifiedDate] || '''' ,'YYYY-MM-DD'),'YYYY-MM-DD')

#1


2  

On the variables tab click on this variable, and press F4 to show properties Tab.

在variables选项卡上单击该变量,然后按F4显示properties选项卡。

Change Evaluate as Expression to True , and Use the following expression:

将Evaluate as表达式更改为True,并使用以下表达式:

"SELECT     OBS_TYPE_ID, OBS_TYPE_NAME, OBS_UNIT_ID, IS_LEAF, PATH, LEVEL0_NAME, LEVEL1_NAME, LEVEL2_NAME, LEVEL3_NAME, LEVEL4_NAME, 
                  LEVEL5_NAME, LEVEL6_NAME, LEVEL7_NAME, LEVEL8_NAME, LEVEL9_NAME, LEVEL10_NAME, LEVEL0_UNIT_ID, LEVEL1_UNIT_ID, 
                  LEVEL2_UNIT_ID, LEVEL3_UNIT_ID, LEVEL4_UNIT_ID, LEVEL5_UNIT_ID, LEVEL6_UNIT_ID, LEVEL7_UNIT_ID, LEVEL8_UNIT_ID, LEVEL9_UNIT_ID, 
                  LEVEL10_UNIT_ID, HIERARCHY_LEVEL, CREATED_DATE, CREATED_BY, LAST_UPDATED_DATE, LAST_UPDATED_BY
FROM         NIKUREP.NBI_DIM_OBS_V
WHERE LAST_UPDATED_DATE >= TO_CHAR(TO_DATE('" + @[User::LastModifiedDate] + "','YYYY-MM-DD'),'YYYY-MM-DD')"

#2


1  

This maybe be @[User::LastModifiedDate] expression.

这可能是@[User::LastModifiedDate]表达式。

Ensure that your paramater(@[User::LastModifiedDate]) is between Single quotes.

确保您的参数(@[User::LastModifiedDate])位于单引号之间。

Change your expression or try this

改变你的表情或者试试这个

...

WHERE LAST_UPDATED_DATE >= TO_CHAR(TO_DATE( '''' || @[User::LastModifiedDate] || '''' ,'YYYY-MM-DD'),'YYYY-MM-DD')