Subject | Re: Stored Procedure Problem |
---|---|
Author | Adam |
Post date | 2008-04-24T06:19:39Z |
--- In firebird-support@yahoogroups.com, "Tomy Handaka"
<Tomy.Handaka@...> wrote:
Both DSQL and PSQL expect the first argument for between to be smaller
than or equal to the second argument. I have no idea what the SQL
standard says about this, but always issue the lower value first if
you want it to work. It doesn't return a null result, it returns 0
records btw.
Adam
<Tomy.Handaka@...> wrote:
>To my knowledge, Firebird does not ever work with the above query.
> Dear all,
>
>
>
> I have a 'strange' behaviour on Firebird's stored procedure. I
> constructed a query for a report that includes date format as input
> parameter, like (simplified):
>
> SELECT...
>
> FROM... WHERE .... between :DATETO and :DATEFROM <==
> DATEFROM is smaller than DATETO
>
>
>
> If that query is executed using SQLEditor, it works well. But when it
> applied into stored procedure, with valid statement, the query return
> null result.
Both DSQL and PSQL expect the first argument for between to be smaller
than or equal to the second argument. I have no idea what the SQL
standard says about this, but always issue the lower value first if
you want it to work. It doesn't return a null result, it returns 0
records btw.
Adam