Thread View: borland.public.interbase.sql
2 messages
2 total messages
Started by The DeerBear
Wed, 27 Nov 2002 10:08
SP... :(((
Author: The DeerBear
Date: Wed, 27 Nov 2002 10:08
Date: Wed, 27 Nov 2002 10:08
23 lines
1312 bytes
1312 bytes
CREATE PROCEDURE GETVALUE (TblIndex Varchar(30),
FldIndex Integer)
returns (FldValue Varchar(255))
AS
declare variable counter Integer;
begin
counter = 0;
for select VALORE FROM Tabella having( Select * FROM DOC_Tabella WHERE
ID_TABELLA=:TblIndex)
into FldValue
counter = counter+1
if counter >= 1 then
exit;
Suspend;
end
It seems not being recognizing "Select *" in the "having" clause.
Where may the problem be?
TIA
Andrew
Re: SP... :(((
Author: Martijn Tonies
Date: Wed, 27 Nov 2002 10:26
Date: Wed, 27 Nov 2002 10:26
46 lines
2110 bytes
2110 bytes
Hi, > CREATE PROCEDURE GETVALUE (TblIndex Varchar(30), > FldIndex Integer) > returns (FldValue Varchar(255)) > AS > declare variable counter Integer; > begin > counter = 0; > for select VALORE FROM Tabella having( Select * FROM DOC_Tabella WHERE > ID_TABELLA=:TblIndex) > into FldValue > counter = counter+1 > if counter >= 1 then > exit; > Suspend; > end > > It seems not being recognizing "Select *" in the "having" clause. What's the error message you're getting? From my personal syntax-check tool, you need a DO after a FOR SELECT clause. Also, it's better to use : before the variables in the INTO clause. I also don't see a BEGIN END block after your FOR SELECT ... Why are you using FOR SELECT anyway? Why not use a SELECT INTO statement? Why are you using SUSPEND? The source you've posted above is plain wrong at multiple places... -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase & Firebird http://www.upscene.com Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads