Subject | Re: [firebird-support] stored procedures and sqlcode |
---|---|
Author | Yang Jin |
Post date | 2003-06-24T00:48:20Z |
hi,
If you wanna return a record,you should use suspend.
I suggest you show the all sqlcode.It can help to find the error.
jinyang
martene_firebird <marten.ehnberg2@...> wrote:
Hi All!
I am trying to write a stored procedure which will perform a select
that returns one record. My problem is how to correctly use SQLCODE.
(I have read about error-handling in "Language Reference"
and "Embedded SQL Guide").
This is what I am trying to do(pseudo-code):
begin
select field
from table
where condition
into somevariable
if no_records_found then
begin
select field
from table
where some_other_condition
into somevariable
end
end
I would be very greatful if anyone could provide me with the correct
syntax.
Regards
/M�rten Ehnberg
Yahoo! Groups SponsorADVERTISEMENT
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do You Yahoo!?
网恋的诠释:真情还是放纵?
[Non-text portions of this message have been removed]
If you wanna return a record,you should use suspend.
I suggest you show the all sqlcode.It can help to find the error.
jinyang
martene_firebird <marten.ehnberg2@...> wrote:
Hi All!
I am trying to write a stored procedure which will perform a select
that returns one record. My problem is how to correctly use SQLCODE.
(I have read about error-handling in "Language Reference"
and "Embedded SQL Guide").
This is what I am trying to do(pseudo-code):
begin
select field
from table
where condition
into somevariable
if no_records_found then
begin
select field
from table
where some_other_condition
into somevariable
end
end
I would be very greatful if anyone could provide me with the correct
syntax.
Regards
/M�rten Ehnberg
Yahoo! Groups SponsorADVERTISEMENT
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do You Yahoo!?
网恋的诠释:真情还是放纵?
[Non-text portions of this message have been removed]