Re: counting records




"Pierre" <pf@xxxxxxxxxx> ha scritto nel messaggio
news:C04Pe.73678$Qh7.1045731@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I have a table with one numeric fields.
> i want to add a record number field in a query
> Look simple but i cant do it! - help
> I have: order no
> 1
> 2
> 6
> 7
> 8
>
> I want: order no;recno -
> 1|1
> 2|2
> 6|3
> 7|4
> 8|5
>
> Regards
> pierre
>

Hi Pierre,

you need a subQuery :
(select count(*) from YourTable as aaa where aaa.[order
no]<YourTable.[order no]+1) as recNo ....

Ciao, Sandro




.



Relevant Pages

  • Re: Can I create a field in a table containing a formula?
    ... ktlooney wrote: ... > I have two numeric fields and would like to create a field in the ... you do this in a query and then use the query every place where you need ... Prev by Date: ...
    (microsoft.public.access.tablesdbdesign)
  • COMPARE FIELDS QUERY
    ... I need a query that searches 2 fields in 2 tables. ... There are 2 numeric fields in each of the 2 tables containing numbers such ... Simon Gare ... Prev by Date: ...
    (microsoft.public.access.adp.sqlserver)
  • counting records
    ... I have a table with one numeric fields. ... i want to add a record number field in a query ... Look simple but i cant do it! ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Exporting Data as text file
    ... To have the spaces replaced with zeroes, write a query that uses the Format ... function on the numeric fields (not the Format property), ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.externaldata)
  • Re: Export problems
    ... Create a query and use the Format function in the query to convert the ... numeric fields to strings. ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.reports)