|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Variable in a ESQL Assignment |
« View previous topic :: View next topic » |
Author |
Message
|
sessionsa |
Posted: Tue Nov 20, 2007 7:39 am Post subject: Variable in a ESQL Assignment |
|
|
Novice
Joined: 03 Aug 2006 Posts: 13 Location: Lansing, MI
|
I have the following statement at the end I would like to replace the 'TP01' with a variable but I continue to get exceptions I have tried EVAL and PASSTHRU with different uses of single quotes to no avail. Does anyone see what I am doing wrong?
SET Environment.Variables.ToaData[] =
SELECT A.CASE_EDG_GRANTEE, A.PROGRAM_STATUS_CD, A.PROGRAM_TYPE_CD, A.TYPE_OF_ASSISTANCE,
(SELECT B.ELIGIBILITY_STATUS, B.INDV_ELIGIBILITY_EFF_BEGIN_DT, B.INDV_ELIGIBILITY_EFF_END_DT, B.IV_A_INDIVIDUAL_ID,
C.DOB, C.ETHNICITY, C.GENDER_CD, C.IN_HOME_IND, C.IVA_INDIVIDUAL_ID, C.IVA_INDV_FIRST_NAME, C.IVA_INDV_LAST_NAME, C.IVA_INDV_MIDDLE_NAME, C.IVA_INDV_SUFFIX_NAME, C.RACE_CD, C.SSN,
(SELECT D.CS_RELATED_INDV_ID, D.CS_RELATIONSHIP_CD
FROM C.IndividualRelation[] AS D) AS IndvRelation[]
FROM A.ProgramEDGIndv[] AS B, Environment.Variables.CaseData.Caseindividual[] AS C
WHERE C.IVA_INDIVIDUAL_ID = B.IV_A_INDIVIDUAL_ID) AS EDGIndv[]
FROM Environment.Variables.CaseData.CaseProgramEDG[] AS A
WHERE A.TYPE_OF_ASSISTANCE = 'TP01'; |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 20, 2007 7:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Have you tried {variable_name} ? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sessionsa |
Posted: Tue Nov 20, 2007 8:32 am Post subject: |
|
|
Novice
Joined: 03 Aug 2006 Posts: 13 Location: Lansing, MI
|
Yes. I had surfed the forum and tried a number of variances that I had reviewed. The {...} was one that Jefflowery likes to add. I even tried Building the statement into an environment variable and doing an EVAL on that variable. The above statement does work with direct assignment. |
|
Back to top |
|
 |
sessionsa |
Posted: Tue Nov 20, 2007 8:45 am Post subject: |
|
|
Novice
Joined: 03 Aug 2006 Posts: 13 Location: Lansing, MI
|
It was simpler than I thought. I just changed 'TP01' to the variable and it worked. I was making it more complicated than it needed to be. I believed that I had to have the single quotes wrapping the value of the variable in order for it to work. Sorry for the bother. However, you did get me to think in simpler terms.
Thanks. |
|
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
|
|
|
|