|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Illegal data type for target. A non-list field reference is |
« View previous topic :: View next topic » |
Author |
Message
|
sachinramesh |
Posted: Sun Nov 09, 2008 11:33 pm Post subject: Illegal data type for target. A non-list field reference is |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
I am getting the following error from this code
Illegal data type for target. A non-list field reference is
can anybody tell me what is wrong with the code ..
set InputLocalEnvironment.Variables.ACTIVITY_STAT[] = 'SELECT A.ACTIVITY_ID,A.FROM_DATE,A.TO_DATE FROM Database.TBL_CU_VIJETA_INFO_NEW AS A, Database.TBL_CU_VIJETA_SCOPE_SYNC AS B WHERE A.ACTIVE=''Y'' AND B.AREA IN (' || VALID_AREALIST ||') AND A.BRAND_VARIANT=' || '''' || CH_IVCODE1 || '''' || ' AND A.OUTLET_TIER=' || '''' || CH_OUTLET_TIER || '''' || ' AND A.ACTIVITY_ID=B.SOURCE_ID';
SET InputLocalEnvironment.Variables.ACTIVITY_LIST[] = 'SELECT DISTINCT from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST'; |
|
Back to top |
|
 |
mgk |
Posted: Mon Nov 10, 2008 1:23 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
This:
Code: |
SET InputLocalEnvironment.Variables.ACTIVITY_LIST[] = 'SELECT DISTINCT from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST'; |
and your other statement should lose the square brackets so they look like:
Code: |
SET InputLocalEnvironment.Variables.ACTIVITY_LIST = 'SELECT DISTINCT from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST'; |
This is because you are simple assigning a single (non-list) string to the target. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
sachinramesh |
Posted: Mon Nov 10, 2008 1:43 am Post subject: |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
Hi mgk ,
I changed my code like
SET InputLocalEnvironment.Variables.ACTIVITY_LIST[] = '(SELECT A.ACTIVITY_ID,A.FROM_DATE,A.TO_DATE FROM Database.TBL_CU_VIJETA_INFO_NEW AS A, Database.TBL_CU_VIJETA_SCOPE AS B WHERE A.ACTIVE=''Y'' AND B.AREA IN (' || VALID_AREALIST ||') AND A.BRAND_VARIANT=' || '''' || CH_IVCODE1 || '''' || ' AND A.OUTLET_TIER=' || '''' || CH_OUTLET_TIER || '''' || ' AND A.ACTIVITY_ID=B.SOURCE_ID)';
SET InputLocalEnvironment.Variables.ACTIVITY_LIST_ID[] = '(SELECT DISTINCT FROM ACTIVITY_LIST[])';
but this is still not working..
suggest me how to change this code.
my first query fetches the records from two tables and the next query fetches the distinct records from the records fetched by first query ..
mgk wrote: |
This:
Code: |
SET InputLocalEnvironment.Variables.ACTIVITY_LIST[] = 'SELECT DISTINCT from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST'; |
and your other statement should lose the square brackets so they look like:
Code: |
SET InputLocalEnvironment.Variables.ACTIVITY_LIST = 'SELECT DISTINCT from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST'; |
This is because you are simple assigning a single (non-list) string to the target. |
|
|
Back to top |
|
 |
Luke |
Posted: Tue Nov 11, 2008 1:31 am Post subject: |
|
|
Centurion
Joined: 10 Nov 2008 Posts: 128 Location: UK
|
Think the initial problem was you creating results in InputLocalEnvironment.Variables.ACTIVITY_STAT[] then in the second select trying to get them from InputLocalEnvironment.Variables.ACTIVITY_STAT_TEST
which is a bit silly, as it's not even the right name. Plus as mgk points out, your [] are an issue ... if you're dealing with a list they should be on both sides of your second SET, if not neither.
I don't know what's going on in the revised code you've posted ...
'(SELECT DISTINCT FROM ACTIVITY_LIST[])';
Should that be
'(SELECT DISTINCT FROM InputLocalEnvironment.Variables.ACTIVITY_LIST[])';
?? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|