Home » RDBMS Server » Server Administration » double value in result of Oracle9i's SQL statement
double value in result of Oracle9i's SQL statement [message #58136] Mon, 04 August 2003 09:30
Nguyen Ba Tu
Messages: 4
Registered: August 2003
Junior Member
hi all,
I have a question to you(s) as follows.

- I use Oracle 9i (9.0.1.1) on server IBM eserver(4 cpu)
- There are 100 clients connecting to server
- I use ADO ver 2.1 above to connect to DB in my program.
- I have three tables be CUSTOMER, PAYMENT_TRACKING, and PAYMENT_DETAIL

Create table CUSTOMER
(CUSTOMER_CODE VARCHAR2(15),
CUSTOMER_NAME VARCHAR2(75),
CUSTOMER_ADDR VARCHAR2(75),
....
)
with primary key be CUSTOMER_CODE,

Create table PAYMENT_TRACKING
(
PAYMENT_ID NUMBER(10),
CUSTOMER_CODE VARCHAR2(15),
CASHIER_CODE VARCHAR2(15),
PAYMENT_DATE DATE,
....
)
with PAYMENT_ID is unique key

Create table PAYMENT_DETAIL
(
PAYMENT_ID NUMBER(10),
PAYMENT_DEBT NUMBER(10),
VAT_DEBT NUMBER(10)
.....
)

with PAYMENT_ID is unique key

- I have SQL statement as follow:
SELECT A.CUSTOMER_CODE, A.CUSTOMER_NAME,
SUM(C.PAYMENT_DEBT) AS PAYMENT_DEBT,
SUM(C.VAT_DEBT) AS VAT_DEBT
FROM CUSTOMER A, PAYMENT_TRACKING B, PAYMENT_DETAIL C
WHERE B.PAYMENT_ID = C.PAYMENT_ID
AND B.CUSTOMER_CODE = B.CUSTOMER_CODE
AND B.PAYMENT_DATE = TO_DATE('01/08/2003','DD/MM/YYYY')
AND B.CASHIER_CODE = 'MY'
GROUP BY A.CUSTOMER_CODE, A.CUSTOMER_NAME

When I executed my SQL in SQL Navigator of Quests software, it always runed exactly, but in my program using Active report is written by VB, sometime, the value of two fields (PAYMENT_DEBT, VAT_DEBT) is double (not always) so it very dificult to debug. May be, I restart my computer and reopen my program, it run exactly, not double. But until tomorow, it can double

I tested my code, it is exactly. If i use Oracle 8i 8.1.7, my program is always exact. Never double of value

I don't know what happen

Please help me if you can
Previous Topic: sometime, double value in result of Oracle9i's SQL statement
Next Topic: exp/imp utl's
Goto Forum:
  


Current Time: Fri Sep 20 12:25:01 CDT 2024