To_Char conversion in Access pass through query

I have problem with this To_Chart coversion.
When I run query I got

Run time error '3146'
Odbc call failed
[Oracle][ODBC][Ora]Ora-00936:missing expression


This is Access2003 passThrough query to Oracle9 database.
Apos.Artikelklasse in oracle table is Varchar2(5)
Apos.artnr is Varchar2(25)

Ar.Artklcode in oracle table is Number(5)
Ar.artnr is Varchar2(10)

qryQueryDef.SQL = "SELECT Apos.ARTNR,Apos.ARTIKELKLASSE,Ar.Bezeichnung1 " _
& "FROM " _
& "Main.Aufpos Apos,Main.Art Ar " _
& "WHERE  (Apos.Artikelklasse = To_Char(Ar.Artklcode)(+))And (Apos.artnr = Ar.Artnr(+)) " 


Any Idea.
Taras.
TarasAsked:
Who is Participating?
 
Jinesh KamdarConnect With a Mentor Commented:
Glad u too found the same issue as i did [see my previous post] :)
0
 
Jinesh KamdarCommented:
There is a space missing in the WHERE clause. Try this.
                                                                                           v -------------- added space here
WHERE (Apos.Artikelklasse = To_Char(Ar.Artklcode)(+)) And (Apos.artnr = Ar.Artnr(+))
0
 
TarasAuthor Commented:
I corrected it and it is the same.
Taras
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Jinesh KamdarCommented:
The parentheses were causing a problem. Try this, it worked for me.

& "WHERE Apos.Artikelklasse = To_Char(Ar.Artklcode(+)) And Apos.artnr = Ar.Artnr(+) "
0
 
TarasAuthor Commented:
I found what was wrong.
It shoul be
WHERE (Apos.Artikelklasse = To_Char(Ar.Artklcode(+))) And (Apos.artnr = Ar.Artnr(+))
Thanks.
0
 
TarasAuthor Commented:
Thanks a lot
Taras
0
All Courses

From novice to tech pro — start learning today.