View previous topic :: View next topic
|
Author |
Message |
vtkaushik
New User
Joined: 20 Jul 2005 Posts: 2
|
|
|
|
Pls can some one tell me what is wrong with this Dynamic Query
I am getting SQL code of -104...
SELECT DISTINCT A.I_PYMT_REQ_DATE ,A.C_PYMT_REQ
MEDIA ,A.I_PYMT_REQ_SEQ_NO ,A.I_PYMT_REQ_LINE_NO F
ROM DB2U49.CP_CLM_PYMT_REQ A ,DB2U49.CP_CLM_MOD_STATUS B
WHERE B.C_CLM_STAT_CVAL IN ('1','3') AND A.D_
SERV_FROM <= '07/18/2005'
AND (A.C_ENRL_AID_CATG = 'AAA'
) A
ND ((A.I_ENRL_BNFT_PGM = '01' AND A.I_ENRL_BNFT_SU
B_PG = '01' AND A.I_ENRL_BNFT_PLN_CD = '0100'
)
) AND A.I_PY
MT_REQ_DATE = B.I_PYMT_REQ_DATE AND A.C_PYMT_REQ_M
EDIA = B.C_PYMT_REQ_MEDIA AND A.I_PYMT_REQ_SEQ_NO
= B.I_PYMT_REQ_SEQ_NO AND A.I_PYMT_REQ_LINE_NO = B
.I_PYMT_REQ_LINE_NO AND A.I_PART_PRSN = B.I_PART_P
RSN AND B.D_MOD_STAT_END IS NULL AND B.D_MOD_STAT_
BEGIN <= '07/18/2005' AND B.D_MOD_STAT_BEGIN >= '0
7/01/2004' AND B.C_CLM_MOD_CVAL IN ('1','2')
Thanks,
Kaushik |
|
Back to top |
|
|
t1nt1n
New User
Joined: 08 Jul 2005 Posts: 31
|
|
|
|
Hello
From what i can see is that you're splitting the fields/keywords(FROM) across lines(may be with spaces at end). This might give this -104. Try correcting these, most likely to work fine.
Hope this helps.
Thanks
-----------------
T1nT1n |
|
Back to top |
|
|
kvramanareddy
New User
Joined: 24 Mar 2005 Posts: 9
|
|
|
|
Hi,
As T1nT1n said, the sql code -104 will come in situation of some Illegegal words present in the SQL. Here i am giving the error code description. 'ILLEGAL SYMBOL "token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE:token-list'
Regards,
K.V.Ramana Reddy. |
|
Back to top |
|
|
vtkaushik
New User
Joined: 20 Jul 2005 Posts: 2
|
|
|
|
the problem of -104 was solved by increasing the space. other than that no code was wrong in the sql query.. |
|
Back to top |
|
|
|