Subject | Re: [firebird-support] RecNo in query |
---|---|
Author | emel.hu |
Post date | 2005-05-25T19:25:54Z |
>>How can I create simple SELECT query that will, in addition toIf no problem a not one started counter and/or not continuous counter,
>>standard columns A,B,C give me count number (recno) as one of
>>resulting columns?
> You could:
>
> 1. Use generator. It will only work if you are the only user doing the select
> at a time.
you can use generator in multiuser environment ;)
... and you can slide a uniq number from RDB$DB_KEY too.
eMeL
Hier two "nice" UDF function:
//-----------------------------------------------------------------------------------
int eMeL_DBKey2RowNum(char * str8bytes)
{
int * ipLow = (int *)(str8bytes + 4);
return *ipLow;
}
//-----------------------------------------------------------------------------------
int eMeL_DBKey2TableID(char * str8bytes)
{
int * ipHigh = (int *)(str8bytes);
return *ipHigh;
}
//-----------------------------------------------------------------------------------