Problem with Sql in Quick screen
cdt@risa.co.za
cdt@risa.co.za
Wed, 21 Oct 98 17:31:07 +0200
Hi
I have the problem with the following piece of code. This is a subscreen(which
functions as a lookup screen). The sql gives the error everytime I run it. I
have used different sql in a similiar subscreen and it works. I think the
problem is that CALL is a reserved word. In the Powerhouse manual, CALL in the
sql is used to call different procedures within the sql.
==============================================================================
I have included the main errors, I understand what the other errors are from
set list sql
/ Sql selects all the call_id, call_desc, area_id from the various tables where
call_desc is similiar to the variable tCALL_DESC which is initialized with
the variable tCALL_ID which is passed to the subscreen. /
declare cSLTCID cursor for &
select &
ca.call_id, &
c.call_desc, &
r.area_id &
from &
wkbem.call_area_alloc ca, &
wkdis.call c,&
wkdis.route_call rc, &
wkdis.route r &
where &
ca.call_id = c.call_id &
and c.call_id = rc.call_id &
and rc.route_id = r.route_id &
and upper(c.call_desc) like :tCALL_DESC
/ Standard menu system that we have created /
use $MENUBIN/setup.qku nolist
screen l_call &
nomode &
noaction &
fieldmark &
message on line 24 &
activities find &
from 9,15 to 21,75 &
receiving tCALL_ID
temp tCALL_ID char*10
temp tCALL_DESC varchar*40 initial '%' + upshift(trunc(tCALL_ID)) + '%' &
reset at startup
cursor cSLTCID primary occurs 10 cache 40
*E* Error parsing SQL statement.
DMS-E-GENERAL, A general exception has occurred during operation 'prepare
request'.
DMS-E-SS_SYNTAX, A syntax error was detected near 'CALL'.
__ Sql after PowerHouse variables/expression are removed:
__ SELECT CA.CALL_ID, C.CALL_DESC, R.AREA_ID
__ FROM WKBEM.CALL_AREA_ALLOC CA, WKDIS.CALL C, WKDIS.ROUTE_CALL RC,
__ WKDIS.ROUTE R
__ WHERE CA.CALL_ID = C.CALL_ID AND
__ C.CALL_ID = RC.CALL_ID AND
__ RC.ROUTE_ID = R.ROUTE_ID AND
__ UPPER (C.CALL_DESC) LIKE :phE1
*E* Error parsing SQL statement.
DMS-E-GENERAL, A general exception has occurred during operation 'prepare
request'.
DMS-E-SS_SYNTAX, A syntax error was detected near 'CALL'.
access sequential
^^^^^^
*E* Expected: FILE CURSOR SQL DECLARE TRANSACTION ITEM TEMPORARY
DEFINE KEY ACTIONMENU MENUITEM TITLE SKIP ALIGN CLUSTER FIELD
SUBSCREEN THREAD COMMAND HILITE DRAW GENERATE PROCEDURE
DESCRIPTION BUILD CANCEL EXIT QUIT SAVE USE REVISE PAINT HELP
QSHOW SET SHOW GO <eol>
draw thick 1,1 to 13,60
hilite title inverse
title "[Call Descrip " at 1,2
title "... ]"at 1,55
hilite title default
skip to line 1
align (,,24)
field tCALL_DESC display for ,21
skip to line 3
align (3,,6)(,,48)
cluster occurs with cSLTCID vertical
field CALL_DESC display
field CALL_ID display
field AREA_ID display
cluster
procedure designer 1
begin
let tCALL_ID = CALL_ID of cSLTCID
return
end
build list detail
exit
Charl du Toit
Email cdt@risa.co.za
Tel : +27(21) 888 3720
Fax: +27(21) 883 8692
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.