Hi,
the following select fetches all records of the table (FB 2.5.4) and obviously brings no resultset.
select * from Mytable where 1=0
Is there a trick to force Firebird not to scan all records?
We sometimes use such a statement (in for select loops) to get different datasets and process it in the loop.
select ... from Table1 where :InputParam = 'A'
union
select ... from Table2 where :InputParam = 'B'
Regards,
Josef
__._,_.___
Posted by: Josef.Gschwendtner@Quattro-Soft.de
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.
__,_._,___
No comments:
Post a Comment