Subject | Re: need help - can't re-create stored procedure... |
---|---|
Author | zamb1zz1 |
Post date | 2004-12-06T20:38:27Z |
Alright, but here's an example, I just tried to create the sproc I
posted earlier - without quotes. I get an error, here's the error &
sproc:
ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 22, char 18
_order_id
create procedure sel_active_order_by_customer_id
(
user_id varchar(50)
)
returns
(
order_id_ int,
user_id_ varchar(50),
invoice_id_ varchar(50),
order_date_ date,
ship_date_ date,
order_status_ varchar(50),
payment_status_ varchar(50),
shipping_amt_ decimal,
tax_amt_ decimal,
order_amt_ decimal,
payment_message_ varchar(100),
avs_code_ varchar(50),
is_active_ char(1)
)
as
declare variable _order_id int;
declare variable _user_id varchar(50);
declare variable _invoice_id varchar(50);
declare variable _order_date date;
declare variable _ship_date date;
declare variable _order_status varchar(50);
declare variable _payment_status varchar(50);
declare variable _shipping_amt decimal;
declare variable _tax_amt decimal;
declare variable _order_amt decimal;
declare variable _payment_message varchar(100);
declare variable _avs_code varchar(50);
declare variable _is_active char(1);
begin
for
select
order_id,
user_id,
invoice_id,
order_date,
ship_date,
order_status,
payment_status,
shipping_amt,
tax_amt,
order_amt,
payment_message,
avs_code,
is_active
from
order
where
is_active = 'Y'
and
user_id = :user_id
into
:_order_id,
:_user_id,
:_invoice_id,
:_order_date,
:_ship_date,
:_order_status,
:_payment_status,
:_shipping_amt,
:_tax_amt,
:_order_amt,
:_payment_message,
:_avs_code,
:_is_active
do
suspend;
end
posted earlier - without quotes. I get an error, here's the error &
sproc:
ISC ERROR CODE:335544569
ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 22, char 18
_order_id
create procedure sel_active_order_by_customer_id
(
user_id varchar(50)
)
returns
(
order_id_ int,
user_id_ varchar(50),
invoice_id_ varchar(50),
order_date_ date,
ship_date_ date,
order_status_ varchar(50),
payment_status_ varchar(50),
shipping_amt_ decimal,
tax_amt_ decimal,
order_amt_ decimal,
payment_message_ varchar(100),
avs_code_ varchar(50),
is_active_ char(1)
)
as
declare variable _order_id int;
declare variable _user_id varchar(50);
declare variable _invoice_id varchar(50);
declare variable _order_date date;
declare variable _ship_date date;
declare variable _order_status varchar(50);
declare variable _payment_status varchar(50);
declare variable _shipping_amt decimal;
declare variable _tax_amt decimal;
declare variable _order_amt decimal;
declare variable _payment_message varchar(100);
declare variable _avs_code varchar(50);
declare variable _is_active char(1);
begin
for
select
order_id,
user_id,
invoice_id,
order_date,
ship_date,
order_status,
payment_status,
shipping_amt,
tax_amt,
order_amt,
payment_message,
avs_code,
is_active
from
order
where
is_active = 'Y'
and
user_id = :user_id
into
:_order_id,
:_user_id,
:_invoice_id,
:_order_date,
:_ship_date,
:_order_status,
:_payment_status,
:_shipping_amt,
:_tax_amt,
:_order_amt,
:_payment_message,
:_avs_code,
:_is_active
do
suspend;
end
--- In firebird-support@yahoogroups.com, Daniel Rail <daniel@a...> wrote:
> Hi,
>
> At December 6, 2004, 16:16, zamb1zz1 wrote:
>
> > I would *REALLY* love not to have to quote everything but I get errors
> > if I don't. I'm using a front-end called IBOConsole and I don't see
> > that I have the option *not* to use quotes.
>
> > I don't get errors from the front-end, BTW, they are firebird-level
> > errors.
>
> > It tells me it can't find the object if I don't quote it.
>
> You simply don't use the quotes when creating the database objects,
> then they will be case insensitive. Otherwise they will be case
> sensitive and will have to use quotes.
>
> --
> Best regards,
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)