Hi all -
This is probably something very simple but I am stumped. I have a query that I run over a sales detail table. Two of the fields are numeric 8,2 ( amount and cost ). When the query encounters a reversing entry where 499.00 becomes -499.00 and 251.25 becomes -251.25 ( the reversing record is an exact copy except for the minus in 3 fields and a cancellation flag ), the result set contains either two positives or two negatives.
It is as if the query is ignoring the sign in the original.
Some condensed code:
SELECT Deliverd.dl_sku,;
Deliverd.dl_ven,;
Deliverd.dl_item,;
Deliverd.dl_ctrlno,;
Deliverd.dl_cost,;
Deliverd.dl_bkcost,;
Deliverd.dl_amnt,;
Deliverd.dl_inv, ;
Deliverd.dl_custnum,;
Deliverd.dl_invdate,
Dldhdr.sh_cusnam,;
Dldhdr.sh_slsmn1,;
Dldhdr.sh_store ;
FROM itwinv!deliverd INNER JOIN itwinv!dldhdr ;
ON Deliverd.dl_inv = Dldhdr.sh_invoice;
INTO TABLE slshist.dbf
dl_cost,dl_bkcost & dl_amnt all exhibit the symptoms - all are N 8,2
Help
Steve
This is probably something very simple but I am stumped. I have a query that I run over a sales detail table. Two of the fields are numeric 8,2 ( amount and cost ). When the query encounters a reversing entry where 499.00 becomes -499.00 and 251.25 becomes -251.25 ( the reversing record is an exact copy except for the minus in 3 fields and a cancellation flag ), the result set contains either two positives or two negatives.
It is as if the query is ignoring the sign in the original.
Some condensed code:
SELECT Deliverd.dl_sku,;
Deliverd.dl_ven,;
Deliverd.dl_item,;
Deliverd.dl_ctrlno,;
Deliverd.dl_cost,;
Deliverd.dl_bkcost,;
Deliverd.dl_amnt,;
Deliverd.dl_inv, ;
Deliverd.dl_custnum,;
Deliverd.dl_invdate,
Dldhdr.sh_cusnam,;
Dldhdr.sh_slsmn1,;
Dldhdr.sh_store ;
FROM itwinv!deliverd INNER JOIN itwinv!dldhdr ;
ON Deliverd.dl_inv = Dldhdr.sh_invoice;
INTO TABLE slshist.dbf
dl_cost,dl_bkcost & dl_amnt all exhibit the symptoms - all are N 8,2
Help
Steve