Hello,
Maybe this time I'll get an answer...
There is a query - eg.:
select * from simpsons;
I want to have a record number. In subquery
it shuld work like that:
Query:
select t.*
from
(select recno,lastname from simpsons) t
where t.lastname like "S%"
Result:
RecNo LastName
1 - Simpson
6 - Skiner
8 - Santa's Little Helper
As you can see - rec no should count subquery,
not the result set.
I have a solution:
select recno(-1),*
from ( select rowid,* from simpsons )
where
recno (random()) > 0 and
lastname like "S%"
recno in this example is my function - it is simple
counter - if param is > 0. If param is < 0 counter
is not incremented. In both cases function returns
actual counter.
It works as I expect. I would like to know if some
one else did somethink like that? Would it work in
future versions?
--
Regards,
Michal Zaborowski (TeXXaS)
http://sqlite4delphi.sourceforge.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]