arneweise77
Programmer
Hi!
I´ve written a sql query, trying to get the sum of several columns in my access database.
The column which holds figures, has the format text. I know I maybe could change this and have it as Integer instead, but is there another way to get past this problem? The whole database is in text which I don´t prefer to change.
Just using Sum in the query makes the commas dissapear.
For example, 1.0 + 2.0 gives the sum 30!
Here´s the code:
SQL = "SELECT SUM(hours) " & _
"FROM MP62, MP50 " & _
"WHERE MP62.workcenter = MP50.workcenter_code AND" & _
" MP50.workcenter_code = 'K'"
If anyone knows how to solve this, please help me.
Thanx!
I´ve written a sql query, trying to get the sum of several columns in my access database.
The column which holds figures, has the format text. I know I maybe could change this and have it as Integer instead, but is there another way to get past this problem? The whole database is in text which I don´t prefer to change.
Just using Sum in the query makes the commas dissapear.
For example, 1.0 + 2.0 gives the sum 30!
Here´s the code:
SQL = "SELECT SUM(hours) " & _
"FROM MP62, MP50 " & _
"WHERE MP62.workcenter = MP50.workcenter_code AND" & _
" MP50.workcenter_code = 'K'"
If anyone knows how to solve this, please help me.
Thanx!