Subject | Re: [ib-support] Re: SP question |
---|---|
Author | Helen Borrie |
Post date | 2001-08-03T11:55:52Z |
At 10:19 AM 03-08-01 +0000, you wrote:
Your Select...into syntax is incorrect. Move the INTO subclause to the end and it should work.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi Sean,Steve,
> thanks for your time............
> >
> > You should be able to do it in a single select statement, which
>goes:
> >
> > Select ACCNT_ID, SUM(CHARGE)
> > From JOBS
> > Where COMPLETED between :startDate and :endDate
> > Group By ACCNT_ID
> >
> > Sean
>
>I can't get this to work. I've tried....
>
>SET TERM !! ;
>CREATE PROCEDURE FBS_REPORT_PROC (startDate DATE, endDate DATE)
>RETURNS (account SMALLINT, totalCharge DECIMAL(9,3))
>AS
>BEGIN
> Select ACCNT_ID, SUM(CHARGE) into :account, :totalCharge
> From JOBS
> Where COMPLETED between :startDate and :endDate
> Group By ACCNT_ID;
>END !!
>SET TERM ; !!
>
>and
>
>SET TERM !! ;
>CREATE PROCEDURE FBS_REPORT_PROC (startDate DATE, endDate DATE)
>AS
>BEGIN
> Select ACCNT_ID, SUM(CHARGE)
> From JOBS
> Where COMPLETED between :startDate and :endDate
> Group By ACCNT_ID;
>END !!
>SET TERM ; !!
>
>and various other combinations in my script, but it bombs when run.
>Am I even close?
Your Select...into syntax is incorrect. Move the INTO subclause to the end and it should work.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________