Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with aggregating data

Status
Not open for further replies.

richardleehl

Technical User
Feb 13, 2008
7
US
Hi, I seem to have problems aggregating data and then storing the data into a temp table for later viewing:

Ex:

select ticketnum, sum(priceextension) total
into "#table1"
from TICKHISD
where ticketnum=457117
group by ticketnum


trying to view the temp table:

select * from "#table1"


result:

ODBC Error: SQLSTATE = , Native error code = 0
A required ODBC entry point was not found. Make sure ODBC is installed correctly.




If i just do a simple data dump into the temp table without using an aggregate function the contents of the temp table displays correctly:


Ex:

select ticketnum, priceextension
into "#table1"
from TICKHISD
where ticketnum=457117


select * from "#table1"


results:

457117 22200.00
457117 30.00


any ideas why this is happening? I am running these queries through the Pervasive control center.


Thank you for any insight


 
What version of PSQL are you using? I tried with a simple query using DEMODATA and PSQL 10.21 and it worked correctly.
My queries were:
select name, sum(max_size) total into #table1 from class where id > 100 group by name;

select * from "#table1"

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top