richardleehl
Technical User
Hi,
I have been working for the last two hours trying to figure out why this was happening in Pervasive 8.
table employee (simplified table)
ID salary
A 100
A 100
A 100
simplified version of stored procedure
my stored proc:
select ID, sum(salary) Total from
employee
group by ID
The resultset from this stored proc returns:
ID Total
A 300
However, if I take this simplified stored proc and insert the results of that into a temp table before displaying,
it provides a resultset divided by exactly 100.
stored proc that divides by 100 incorrectly:
select ID, sum(salary) Total
into "#table1"
from employee
group by ID
select ID, TOTAL from "#table1"
Resultset is as follows:
ID Total
A 3.00
The example I'm providing is absolutely simplified and the stored proc actually does a lot more. But if I take the results and insert into a temp table before displaying the temp table contents, the results are always divided by 100.
has anyone else seen this problem?
I have been working for the last two hours trying to figure out why this was happening in Pervasive 8.
table employee (simplified table)
ID salary
A 100
A 100
A 100
simplified version of stored procedure
my stored proc:
select ID, sum(salary) Total from
employee
group by ID
The resultset from this stored proc returns:
ID Total
A 300
However, if I take this simplified stored proc and insert the results of that into a temp table before displaying,
it provides a resultset divided by exactly 100.
stored proc that divides by 100 incorrectly:
select ID, sum(salary) Total
into "#table1"
from employee
group by ID
select ID, TOTAL from "#table1"
Resultset is as follows:
ID Total
A 3.00
The example I'm providing is absolutely simplified and the stored proc actually does a lot more. But if I take the results and insert into a temp table before displaying the temp table contents, the results are always divided by 100.
has anyone else seen this problem?