Home » Developer & Programmer » Forms » Error in default_WHERE
icon10.gif  Error in default_WHERE [message #148142] Tue, 22 November 2005 22:09 Go to next message
aarontan78
Messages: 63
Registered: August 2005
Member
Hi all,

I got an error: Encountered the symbol ''T'' when expecting one of the
following:.....
when I compile the below pre-query:

begin
if :g04.v_ack is null then

SET_BLOCK_PROPERTY('G04', DEFAULT_WHERE, 'COMd = :global.comd AND EXISTS
(SELECT ack FROM g01
WHERE acs = :global.acs AND typ = :g04.v_typ AND pseq = :g04.v_pseq
AND ctyp IN ('T','U') and sts = 'A' AND ack = g04.ack)
AND GTD.GUERVAL(:global.userid, comd, :global.noid, gkey) = 'Y'');

else

SET_BLOCK_PROPERTY('G04', DEFAULT_WHERE, 'COMd = :global.comd AND EXISTS
(SELECT ack FROM g01
WHERE acs = :global.acs AND typ = :g04.v_typ AND pseq = :g04.v_pseq
AND acd = :g04.v_ack
AND ctyp IN ('T','U') and sts = 'A' AND ack = g04.ack)
AND GTD.GUERVAL(:global.userid, comd, :global.noid, gkey) = 'Y'');

end if;
end;


I have tried to use methods taught at the forum like using ||, etc.
but still have errors.
Any idea what's wrong with the codings?
Thanks in advance.

Regards,
Aaron
Re: Error in default_WHERE [message #148176 is a reply to message #148142] Wed, 23 November 2005 00:25 Go to previous messageGo to next message
VSPB
Messages: 27
Registered: August 2005
Junior Member
Hi

Can you please write the complete error message. Encountered the symbol ''T'' when expecting one of the
following:.....

i had faced a similar problem. I guess there is a problem with the quotes. The quote that you started before COMd ('COMd) needs to be closed before 'T.

Hope this solves your problem...
Re: Error in default_WHERE [message #148181 is a reply to message #148176] Wed, 23 November 2005 00:34 Go to previous messageGo to next message
aarontan78
Messages: 63
Registered: August 2005
Member
Hi
You are correct, it's the quotes...but how can I concat the whole statement?

Thanks and regards...
Re: Error in default_WHERE [message #148189 is a reply to message #148181] Wed, 23 November 2005 00:51 Go to previous messageGo to next message
VSPB
Messages: 27
Registered: August 2005
Junior Member
SET_BLOCK_PROPERTY('G04', DEFAULT_WHERE, 'COMd = '|| :global.comd ||' AND EXISTS
(SELECT ack FROM g01
WHERE acs = '||:global.acs||' AND typ = '||:g04.v_typ||' AND pseq = '||:g04.v_pseq||'
AND ctyp IN '||'(''T'',''U'') and sts = ''A'' AND ack = '||g04.ack||')
AND GTD.GUERVAL('||:global.userid||','|| comd||','|| :global.noid||','|| gkey||') = ''Y''');

i think this should work. i am not quite sure of the parameters and the variables through which the value is passed. But still i feel it has to be somewhat like this. try using || for concatenating.

Hope it helps you...

[Updated on: Wed, 23 November 2005 00:53]

Report message to a moderator

Re: Error in default_WHERE [message #148209 is a reply to message #148189] Wed, 23 November 2005 02:12 Go to previous message
aarontan78
Messages: 63
Registered: August 2005
Member
Hi,

I got it solved by adding ' ' to each quotation marks like ''T''.
Thanks for the help.

Regards...
Previous Topic: How to call oracle form, from another application
Next Topic: please help me am stuck
Goto Forum:
  


Current Time: Fri Sep 20 03:45:15 CDT 2024