selecting rows from a query

  • Thread starter Thread starter wakka
  • Start date Start date
W

wakka

Can anyone help me with this problem?
I want to be able to manipulate data depending on what
number row it appears in when running query "Chg-Base"

I therefore need a way to name each row in Chg-Base with
a number, (with no ties.)

Attached is the relevant SQL
Thankyou in advance.


SELECT [Patient Details].PatientCode, [Operation
Details].OperationCode, [Procedure
Details].MBSProcedureCode,
MBSchedule.MBSProcedureDescription,
BillingFundFee.BillingFundSecondaryFee, MBSchedule.
[MBSFullFee*Indicator], BillingFund.BillingFundMinimumFee
FROM [Operation Details] INNER JOIN ((MBSchedule INNER
JOIN (((BillingFund INNER JOIN BillingFundFee ON
BillingFund.BillingCode = BillingFundFee.BillingCode)
INNER JOIN [HealthFund Details] ON
BillingFund.BillingCode = [HealthFund
Details].BillingCode) INNER JOIN [Patient Details] ON
[HealthFund Details].HealthFundCode = [Patient
Details].HealthFundCode) ON MBSchedule.MBSProcedureCode =
BillingFundFee.MBSProcedureCode) INNER JOIN [Procedure
Details] ON MBSchedule.MBSProcedureCode = [Procedure
Details].MBSProcedureCode) ON ([Patient
Details].PatientCode = [Operation Details].PatientCode)
AND ([Operation Details].OperationCode = [Procedure
Details].OperationCode)
ORDER BY BillingFundFee.BillingFundSecondaryFee DESC;
 
This does not make sense, as
a) you reference a record by a unique field, not by it's position within a
dataset.
b) you are sorting by a foreign key.

If you really want to do this, have a look at the AbsolutePosition property
of the recordset.
 
Back
Top