Replace in a Select query doesn't work | | |
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 | | | | re: Replace in a Select query doesn't work
[color=blue]
> What should I do?[/color]
Post the SELECT statement.
Mythran | | | | re: Replace in a Select query doesn't work
* "Robert" <anonymous@discussions.microsoft.com> scripsit:[color=blue]
> 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?[/color]
Post code!
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> | | | | re: Replace in a Select query doesn't work
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... | | | | re: Replace in a Select query doesn't work
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...) | | | | re: Replace in a Select query doesn't work
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 | | | | re: Replace in a Select query doesn't work
* "Robert" <anonymous@discussions.microsoft.com> scripsit:[color=blue]
> This is the query:
>
> SELECT ... ,
>
> (select SUM(iif(isNumeric(replace(Field, ',', '.')),
> replace(Field, ',', '.'), 0))
> FROM ... WHERE ...) AS ValIni,
> ....
>
> FROM...[/color]
Are you sure you are talking about VB.NET?!
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> | | | | re: Replace in a Select query doesn't work
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 | | | | re: Replace in a Select query doesn't work
* <anonymous@discussions.microsoft.com> scripsit:[color=blue]
> you got me...
> :)
>
> Actually I am using VB6.
> But, i open that query from a dinamic ADO recordset.[/color]
Notice that there are groups for this technology available:
microsoft.public.vb.database.ado.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> |  | Similar Visual Basic .NET bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,449 network members.
|