Subject RE: [firebird-support] sql question
Author Peter
Hi

I'm actually using Database Workbench

Peter
On 6 Jan 2005 at 13:14, Louis Kleiman wrote:

>
> It looks like this is perhaps a front-end issue. If you are using
Delphi, then the parameters are numbered 0 and 1, not 1 and 2.
there should be only 2 parameters in the query because the names
of the parameter occurrences are the same. Perhaps there is an
issue in the FB access component set you are using that thinks at
one point that there are four parameters and later gets an error when
it tries to access the third one (indexed as 2). Bottom line, don't try
to access a parameter with an index of greater than 1.
>
> Louis Kleiman
> SSTMS, Inc.
>
> -----Original Message-----
> From: Peter Chaisty [mailto:peter@...]
> Sent: Thu 1/6/2005 1:02 PM
> To: firebird-support@yahoogroups.com
> Cc:
> Subject: [firebird-support] sql question
>
>
>
>
> Hi
>
> I'm stuck on some sql that I am converting from a stored
procedure and
> I am getting an error
>
> List index out of bounds (2)
>
> The sql is
>
> INSERT INTO PIN_REPORT(VOUCHER_ID,PRODUCT_ID)
> SELECT DISTINCT VOUCHER_ID,PRODUCT_ID
> FROM PINS
> WHERE
> (PINS.DOWNLOAD_DATE >= :startdate and
PINS.DOWNLOAD_DATE <
> :enddate + 1)
> OR
> (PINS.STATUS_CHANGED >= :startdate and
PINS.STATUS_CHANGED <
> :enddate +1 AND PINS.STATUS = 5)
>
>
> If I remove the OR statement and put in just one of the
statements
> either side of the or it works, so it's not a variable or
expresion
> problem.
> Also the where expression works fine in a stored procedure.
> I have tried extra brackets around the whole expression after
the
> WHERE statement but it then gives the List index error.
>
> Can anyone suggest anything ?.
>
> Peter
>
>
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> click here
<http://us.ard.yahoo.com/SIG=129v73n9k/M=298184.5639630.6699
735.3001176/D=groups/S=1705115386:HM/EXP=1105121024/A=24
34971/R=0/SIG=11eeoolb0/*http://www.netflix.com/Default?mqso=6
0185400>
>
<http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.30011
76/D=groups/S=:HM/A=2434971/rand=247865640>
>
>
> _____
>
> Yahoo! Groups Links
>
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-
unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service <http://docs.yahoo.com/info/terms/> .
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>


--
=================================================
Peter Chaisty FInstBE e-Mail: peter@...
-------------------------------------------------
Cyionics Ltd UK
Tel: +44(0)1495 785570
All email is scanned using Norton Antivirus
=================================================