Home » Developer & Programmer » Forms » ANSI Joins in Forms 6
ANSI Joins in Forms 6 [message #381195] Thu, 15 January 2009 11:21 Go to next message
magda.aguilar
Messages: 2
Registered: January 2009
Location: Ingenieer
Junior Member
Hi , i have this query and works very well on sqlplus but in the lov, show me an error 40502
¿what can i do?

thanks!


SELECT B.SIPMEUNIDAD_ADMON code, B.SIPMENOMBRE_UNIDAD_ADMON name , A.SIPMENOMBRE_UNIDAD_ADMON name_supervisor FROM SIPME_UNIDAD_ADMINISTRATIVA A RIGHT OUTER JOIN SIPME_UNIDAD_ADMINISTRATIVA B
ON (A.SIPMEUNIDAD_ADMON = B.SIPMEUNIDAD_ADMON_SUPERIOR)
WHERE B.SIPMEUNIDAD_ADMON=TO_NUMBER(DECODE(:ColValor,'0', B.SIPMEUNIDAD_ADMON, :ColValor))
ORDER BY B.SIPMEUNIDAD_ADMON
Re: Unable to read the LOV Values, when click on the Button [message #381207 is a reply to message #381195] Thu, 15 January 2009 16:30 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess that your Forms PL/SQL version doesn't recognize ANSI joins; rewrite the query so that it will use an "old" Oracle join syntax.
Re: Unable to read the LOV Values, when click on the Button [message #381225 is a reply to message #381195] Thu, 15 January 2009 21:34 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
You could also not hijack an existing thread. You could also present your code more clearly by formatting it and enclosing it in 'code' tags.

But as LF says, ANSI SQL is not supported in the version of PL/SQL used by Oracle Forms 6.

David
Re: ANSI Joins in Forms 6 [message #381362 is a reply to message #381195] Fri, 16 January 2009 08:16 Go to previous message
magda.aguilar
Messages: 2
Registered: January 2009
Location: Ingenieer
Junior Member
I found the solution , I have to user Replace before the parameter and it's works!!
thanks any way



SELECT B.SIPMEUNIDAD_ADMON CODIGO, B.SIPMENOMBRE_UNIDAD_ADMON UNIDAD , A.SIPMENOMBRE_UNIDAD_ADMON UNIDAD_PADRE FROM SIPME_UNIDAD_ADMINISTRATIVA A RIGHT OUTER JOIN SIPME_UNIDAD_ADMINISTRATIVA B ON (A.SIPMEUNIDAD_ADMON = B.SIPMEUNIDAD_ADMON_SUPERIOR)

WHERE B.SIPMEUNIDAD_ADMON = DECODE(replace(:Global.ColValor, '''', '') ,'', B.SIPMEUNIDAD_ADMON,replace(:Global.ColValor, '''', ''))

ORDER BY B.SIPMEUNIDAD_ADMON
Previous Topic: Create A New Record
Next Topic: submitting concurrent from PL/SQL problem
Goto Forum:
  


Current Time: Sun Dec 04 06:25:09 CST 2016

Total time taken to generate the page: 0.08825 seconds