• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

SQL with access 97 mdb

Hi,
I use Delphi 5 with a Access 97 mdb and ADO.
In the delphi adoquery1 sql editor i want to do this :

SELECT agv(table1.pourcent)....
FROM ...

But table1.pourcent is a string.
How to convert to int ?

SELECT avg(cint(table1.pourcent)) dont work
also dont work : stringtostr, string_to_str...

Where i can find a document where all the function are detailled ?


Thanks.

0
lgc5800
Asked:
lgc5800
  • 2
2 Solutions
 
kretzschmarCommented:
what is table1? a ttable instance?
0
 
lgc5800Author Commented:
table1 is a table in the access mdb
0
 
kretzschmarCommented:
what about

SELECT avg(pourcent)....  
FROM table1

??

pourcent is a textfield?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now