[AccessD] Rownumbers

Marcel Vreuls info at oop.nl
Thu Feb 20 10:29:01 CST 2003


Thx Gustav,

Up and running :-). 

Gr. Marcel


-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of Gustav Brock
Sent: donderdag 20 februari 2003 16:20
To: Marcel Vreuls
Subject: Re: [AccessD] Rownumbers


Hi Marcel

Oops, somehow an important part of the Where statement in the subquery
got lost: 

  (SELECT
    COUNT(*)
  FROM
    tblOrderDetail AS tblA
  WHERE
  tblA.OR_OD_NUMMER = tblOrderDetail.OR_OD_NUMMER
  AND
  tblA.OR_NUMMER <= tblOrderDetail.OR_NUMMER;) AS RowNo

So, for you:

  ...
  WHERE
    tmpTabel.or_od_nummer = orderregel.or_od_nummer
    AND
    tmpTabel.or_nummer <= orderregel.or_nummer) AS RowNo
  ...
  
/gustav


> Okay, this is as far as I am. This is the query. I have added a fixed
> ordernumber 9798 for testing.

> SELECT orderregel.or_nummer, (select count(*) FROM orderregel AS tmpTabel
> WHERE tmpTabel.or_od_nummer = orderregel.or_od_nummer) AS Expr2
> FROM orderregel
> WHERE (((orderregel.or_od_nummer)=9798));

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list