Replace in a Select query doesn't work

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

Greetings.
I have a sql query that works just fine in Access.
There is at a certain point in that query a REPLACE(...)
When I try to use this query in VB, it says:
"Undefined function REPLACE in expression"

What should I do?
Thanks in advance
 
* "Robert said:
I have a sql query that works just fine in Access.
There is at a certain point in that query a REPLACE(...)
When I try to use this query in VB, it says:
"Undefined function REPLACE in expression"

What should I do?

Post code!
 
ok...
This is the query

SELECT ... ,

(select SUM(iif(isNumeric(replace
(ValoareInitiala, ',', '.')), replace
(ValoareInitiala, ',', '.'), 0))
FROM RezultateSedinte WHERE
RezultateSedinte.SedintaID>=Lot.IDSedintaStart AND
RezultateSedinte.SedintaID<=Lot.IDSedintaEnd AND
RezultateSedinte.ImuProID=ImuGr1.ID) AS ValIni,
....

FROM...
 
ok...
This is the query:

SELECT ... ,

(select SUM(iif(isNumeric(replace(Field, ',', '.')),
replace(Field, ',', '.'), 0))
FROM ... WHERE ...) AS ValIni,
.....

FROM...




(sorry for writing it twice...)
 
This is the query

SELECT ... ,

(select SUM(iif(isNumeric(replace(Field, ',', '.')),
replace(Field, ',', '.'), 0))
FROM ... WHERE ...) AS ValIni,
.....

FROM...

I use an ado recordset to open query
 
* "Robert said:
This is the query:

SELECT ... ,

(select SUM(iif(isNumeric(replace(Field, ',', '.')),
replace(Field, ',', '.'), 0))
FROM ... WHERE ...) AS ValIni,
....

FROM...

Are you sure you are talking about VB.NET?!
 
you got me...
:)

Actually I am using VB6.
But, i open that query from a dinamic ADO recordset.
So... shouldn't be too different in .NET
 
* said:
you got me...
:)

Actually I am using VB6.
But, i open that query from a dinamic ADO recordset.

Notice that there are groups for this technology available:
microsoft.public.vb.database.ado.
 
Back
Top