Subject | RES: [firebird-support] What is happend ? |
---|---|
Author | Gerson Machado - Yahoo |
Post date | 2004-12-01T17:32:19Z |
You are right !
Tks again Martijn !!
Gerson
-----Mensagem original-----
De: Martijn Tonies [mailto:m.tonies@...]
Enviada em: quarta-feira, 1 de dezembro de 2004 13:36
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] What is happend ?
Hello,
loop. Therefor, it will only return a record to the client AFTER
the loop has executed.
Put the SUSPEND inside the loop (in this case, a BEGIN..END
block) and you'll be fine.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
HYPERLINK "http://www.upscene.com"http://www.upscene.com
Yahoo! Groups Sponsor
ADVERTISEMENT
HYPERLINK
"http://us.ard.yahoo.com/SIG=129dbhhc8/M=298184.5639630.6699735.3001176/
D=groups/S=1705115386:HM/EXP=1102001795/A=2434971/R=0/SIG=11eeoolb0/*htt
p://www.netflix.com/Default?mqso=60185400"click here
HYPERLINK
"http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=group
s/S=:HM/A=2434971/rand=170135798"
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/firebird-support/"http://groups.yahoo.com
/group/firebird-support/
* To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
"firebird-support-unsubscribe@yahoogroups.com
* Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
[Non-text portions of this message have been removed]
Tks again Martijn !!
Gerson
-----Mensagem original-----
De: Martijn Tonies [mailto:m.tonies@...]
Enviada em: quarta-feira, 1 de dezembro de 2004 13:36
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] What is happend ?
Hello,
> So, I have this stored procedure, but only one record I see when herhim
> finish.... Do you know what is happend ?
>
> Perhaps the terminator character ";" semicolon, I read about change
> (set term ^ ; ..... End ^ set term : ^) but I try to using in------------------------------------------------------------------------
> IBManager console, IBConsole and IBEasy console, but unsucessful.
>
> Tks for help
>
> Gerson
>
> See the Stored Procedure:
>
> ---------startSUSPEND is behind the FOR SELECT ... DO BEGIN...END
> CREATE PROCEDURE SP_TB_DGA_POS_BAS_02
> RETURNS (
> COD_DGA_POS INTEGER,
> COD_DGA INTEGER,
> DESC_TOTAL VARCHAR (30),
> QTDE_REFIL INTEGER,
> POSOLOGIA VARCHAR (1000),
> RETURN_CODE_O INTEGER)
> AS
> declare variable qtde_total1 numeric(12,3);
> declare variable desc_total1 varchar(20);
> declare variable qtde_total2 integer;
> begin
> for
> select cod_dga_pos
> ,cod_dga
> ,t1.qtde_total
> ,t2.descricao
> ,t1.qtde_refil
> ,t1.posologia
> from tb_dga_pos_bas t1
> left join tb_dga_tpo2 t2 on
> t1.cod_dga_tpo2_total=t2.cod_dga_tpo2
> into :cod_dga_pos
> ,:cod_dga
> ,:qtde_total1
> ,:desc_total1
> ,:qtde_refil
> ,:posologia
> do
> begin
> qtde_total2 = qtde_total1;
> DESC_TOTAL = qtde_total2 || ' ' || desc_total1;
> end
> suspend;
> End
loop. Therefor, it will only return a record to the client AFTER
the loop has executed.
Put the SUSPEND inside the loop (in this case, a BEGIN..END
block) and you'll be fine.
>------------------------------------------------------------------------
> endSee above.
> So if I change the end of this SP to:
>
> ,:qtde_refil
> ,:posologia
> do suspend;
> End
>
> This work fine !
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
HYPERLINK "http://www.upscene.com"http://www.upscene.com
Yahoo! Groups Sponsor
ADVERTISEMENT
HYPERLINK
"http://us.ard.yahoo.com/SIG=129dbhhc8/M=298184.5639630.6699735.3001176/
D=groups/S=1705115386:HM/EXP=1102001795/A=2434971/R=0/SIG=11eeoolb0/*htt
p://www.netflix.com/Default?mqso=60185400"click here
HYPERLINK
"http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=group
s/S=:HM/A=2434971/rand=170135798"
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/firebird-support/"http://groups.yahoo.com
/group/firebird-support/
* To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
"firebird-support-unsubscribe@yahoogroups.com
* Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 30/11/2004
[Non-text portions of this message have been removed]