Evaluate is not working for my custom function

Hello everyone ,
I have a function , here's the code
CREATE OR REPLACE FUNCTION FU_BUSCA_RECD_PRDC_OBIEE(NIVEL   VARCHAR,
                                                    NM_AGPM VARCHAR) RETURN NUMBER AS
  V_RECD_PRDC NUMBER(10);
BEGIN
  IF NIVEL <> 'nivel1' THEN
    SELECT RECD_PRDC
      INTO V_RECD_PRDC
      FROM AGPM
     WHERE DC = NM_AGPM;
  ELSE
    SELECT RECD_PRDC INTO V_RECD_PRDC FROM RECD_PRDC;
  END IF;
  RETURN V_RECD_PRDC;
END;
So I want to use this :
Evaluate('FU_BUSCA_RECD_PRDC_OBIEE(%1,%2)' ,"Agrupamento de Fluxo (Hierarquia)"."Cód. do Agrupamento de Fluxo","Agrupamento de Fluxo (Hierarquia)"."Agrupamento de Fluxo")
I put it on a column but when I go to Results on Answer I get this error message:
HY000. Código: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] Erro geral. [nQSError: 43113] Mensagem retornada de OBIS. [nQSError: 43119] Falha na Consulta: [nQSError: 17001] Código de erro Oracle: 904, mensagem: ORA-00904: "FU_BUSCA_RECD_PRDC_OBIEE": invalid identifier at OCI call OCIStmtExecute. [nQSError: 17010] Falha de preparação da instrução SQL. (HY000)
Sorry the message isn't in english , but i don't have access to the settings to change it.
When I try to use evaluate with some native db function , for instance :
Evaluate('TO_DATE(%1,%2)' AS CHAR ,'20130326','YYYYMMDD')
It works
Does anyone know what's wrong ?

do i have to do anything after the grant?
i run the grant script , logged off from answer than logged in . is there any other step im missing?

Similar Messages

  • SSO not working for a custom WDA application that runs in the Portal

    I have a Portal system (Java stack, NW04s) that has an iView of type webDynpro ABAP. The custom Web Dynpro ABAP application resides on another system (ABAP stack, running ECC6). We have configured the trust relationship between the Portal and the ECC system as per
    http://help.sap.com/saphelp_nw04s/helpdata/en/61/42897de269cf44b35f9395978cc9cb/content.htm
    We know this is working since we are able to run ESS. However, for the custom WebDynpro ABAP application, when calling it for the first time, a logon screen shows up. How can we get rid of it? what are we missing to have SSO work for the custom WebDynpro application?

    Please check this link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d35bb690-0201-0010-988a-d669c8530518
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2fhelp%2fsdn_help_nw04s%2fsaphelp_nw04s%2fhelpdata%2fen%2f5e%2f6c85c3edf942f39349a1e337434d29%2fcontent.htm
    Hope it helps.
    Regards,
    Mona

  • Table Maintenance(SM30) not working for a custom View..

    Hi,
    I have the below case which is not working at the moment.
    we have standard table T024 and the requirement is to update the table directly in production. To update the standard table i have created a custom maintenance view on this table and created a table maintenance generator for custom view.
    In maintenace status tab of view i have maintened below information:
    Access                                                 read, change, delete and insert
    Delivery class                                       A
    Data Browser/Table View Maint.         Display/ Maintenance allowed
    The table maintenace generator has been also created but when trying to modify it is giving below message
    "Client 210 has status 'not modifiable"
    We have two clients in dev server 200 -for development
                                                            210 - for development testing
    In development it is working but in development testing client and in quality it is not working.
    Can you please help me as to why we are getting the above message?
    Best Regards,
    Rajesh

    Hi Rajesh,
    That is coming because of the Table Maintainance Generator Settings. You have to chose no, or user, recording routine then system will not generate any request and you can update the data. This is actually a BASIS settings in SCC4, so that for customizing tables system should not generate any request.
    Thanks & Regards,
    Faheem.

  • Function Module not working for old Role

    Dears
    Function Module not working for old Role
    Function Module: /VIRSA/BAPI_AE_USERS_FOR_ROLES
    Before EHP4 upgrade this functional module working fine, but after updated users are not visible.
    We have chekced if the users are assigned directly users are visible but indirect (Position Based) assignment users are not apprearing.
    Pl check the fucntion module with given roles below and identify the root cause,
    EP_TRVL_ALL_CAB     - Old Role
    EP_TRN_TRVL_DRGC_V2 - New Role
    Regards
    Krishna Mohan CH
    9704500717

    Krishna,
    I do not think this BAPI is meant to be called by anyone but the application using it, and its functionality may therefore change without notice.
    What are you trying to achieve? Maybe there's a better way to do that...
    Frank.

  • Allow Custom Text Entry for Drop down not working For Dynamic form

    Dear All,
    In drop down field Allow custom text entry is working fine if the form is save as a static pdf form file.But if the form is save as a Dynamic pdf form file it is not working.I can enter custom text in drop down field but after filling it up when I click on next field the text from the drop down is disappearing.
    If any body can please help me to solve this problem.
    Thanks a lot in advance
    Regards
    Rakesh

    Dear Jimmypham,
    Thanks a lot for your quick response.But it's not working for me.I have even tried with a form having only single field and save it as a dynamic pdf file.In that form also it's not working.The text which I have entered is disappearing when I click outside of this field.
    Can you please help me to find out the solution for this problem.
    Regards
    Rakesh

  • BPM Worklist: Searching in custom views does not work for protected flexfields !

    Hello,
    Have mapped few protected attributes in my .task file. Also created the corresponding labels on target SOA server. I am able to create custom views using these protected flex fields.
    But what I have observed is keyword based search is not working for custom views using protected fiexfields.. however it works fine with public fiexfields.
    Any pointers on this? Am I missing something in the configuration?
    Thanks..

    Can anyone help me?

  • Transaction launcher not working for custom business role

    Hi Experts,
    I am facing a very weird problem where the transaction laucher define for BOR transaction is working for one business role(Z business role Customized one) but its not working for other business role (Z business role).
    to emphasize further we have the code:-
    case ls_attributes-object_type.
        when lc_z23 or lc_z25.
          lv_logical_link = lc_ZITISU.
        when lc_BUS2000115.
          lv_logical_link = lc_ZITERP1.
        when others.
          lv_logical_link = lc_ZITERP2.
      endcase.
      l_if_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
      IF l_if_navigation IS BOUND .
    Navigate to transaction launcher using link id
        l_if_navigation->navigate( iv_link_id = lv_logical_link ).
      ENDIF.
    in this the logical link is is lc_ZITISU whenever this BSP application is called from both the business roles but in  one the window opens up for BOR transaction whereas when we login again using different business role the code is the same as given above. I mean the sam logical link id is used and navigated to but window is not opening for transaction launcher as it happens for the previous business role.
    Request your help to resolve this issue.
    Thanks,
    Rajwin

    Hi,
    I tried by applying the PFCG role id of business role which was working to the business role id of the one for which it wasn't working and then try testing whether the transaction launcher is triggering. But the transaction launcher screen is still not opening even after doing this.
    Probably there's something else too which is causing the problem. Request your inputs on this,
    Thanks,
    Rajwin

  • JoinFieldValue function is not working for 'Partner'

    Hi All,
    I'm trying to get value from Partner in workflow, but there is an error message mentioned "<Partner>" is invalid, and then I'm looking for the online help, I found there is no referred record type for 'Partner', is JoinFieldValue function not working for 'Partner'?
    Does anyone know about it?
    Thanks in advance

    Using the Copy function link on a new Web Link Filed, you can pass parameters from one Object to another.
    1 - hit the "Copy" button on a CO Detail Page and grab the URL (This is the Destination Object, i'e I will pass information from Contact (Source) to this CO (Destination))
    Ex: https://secure-rmsomxxxx.crmondemand.com/OnDemand/user/CustomObject5.New?CustomObject5.NewForm.Id=XXXXXXX&OMRET1=CustomObject5.Detail%3fOMTGT%3dCustomObject5.Detail%26OMTHD%3dCustomObject5DetailNav%26CustomObject5.Detail.Id%3dXXXXXXX%26ocTitleField%3dName%26ocTitle%3dXXXXXXXXX%26ocEdit%3dY&OMTGT=CustomObject5.NewForm&OMTHD=CustomObject5PreCopyNav&OMRET0=CustomObject5.HomePage&OCTYPE=
    You would need only a small part from the above:
    https://secure-rmsomxxxx.crmondemand.com/OnDemand/user/CustomObject5.New?CustomObject5.NewForm.[Field you want to Copy]
    2 - Create a Weblink field on Contact and Expose it on the layout your role can see.
    3 - In the Weblink URL use the below
    https://secure-rmsomxxxx.crmondemand.com/OnDemand/user/CustomObject5.New?CustomObject5.NewForm.Description=%%%First_Name%%%
    Save your changes and you're done! you can now see that when you click the link you can pass the Contact First Name in the CO.
    Good Luck!
    Royston

  • Drawing with a custom profile stroke is not working for me. Does it work for you?

    Drawing with a custom profile stroke is not working for me. Does it work for you?
    I can only apply it on an existing stroke but can't draw a new one with the selected profile. In fact if I change the profile to other than the default Uniform I also can't draw a new stroke with any other width than the default 1 point. This doesn't seem normal.
    Using SC5 on a PC.

    Another question on the same topic.
    Once I add a new profile to the list is it possible to put it on top of the list. I need this because the Adobe people decided to put the list in a tiny scrollable window with only a few of the first profiles showing. If there is noting in the interface may be I have to modify some program files settings?

  • Custom Pakage is not working for me.

    I was dropping photos just fine into the custom package a few minutes ago, and printed a few photos.  I imported new photos from my external drive, and when I try to print it does not work in custom. No dropping photos into the boxes, and I cannot drag and move around the boxes. I need help! I don't know what happened that it stopped working. hmm now that I think about it.. the first photos i printed were from a new sony A6000.  The ones i'm trying to print now, print fine in single photos, but they are from an older camera, could that be the reason the custom tab completely is not touchable?..  Okay no.. I just tried to custom package photos from new camera again and its not working for the new photos too..@
    Thanks, in advance..

    I am not sure exactly what is going on, there, but when you drag-and-drop a photo you have to click-drag on the thumbnail, not the surrounding gray border area.
    The reasons you’re guessing why things aren’t working don’t seem like they’d be reasons to me.

  • Reverse Engineering is not working for custom

    hi odi guru's
    i installled Hyperion 11.1.2.2 and ODI 11.1.1 . while doing reverse engineering is not working for custom purpose.
    Iam working with Hyperion Financial management with odi. created dataserver and physical schema and logical schema
    and imported RKM HYperion Financial Management Knowledge module.
    is it required for hyperion latest patches to connect with odi. Please let me know . urgent?
    Thanks in adavnce

    hi
    is it required for hyperion patches to connect with odi?
    iam getting following error.
    ODI-1217: Session HFM_Model (5051) fails with return code 7000.
    ODI-1226: Step HFM_Model fails after 1 attempt(s).
    ODI-1229: An error occurred while performing a Reverse operation on model code HFM_MODEL.
    Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 38, in <module>
         at com.hyperion.odi.hfm.ODIHFMAppConnection.<init>(ODIHFMAppConnection.java:58)
         at com.hyperion.odi.hfm.ODIHFMAppReverser.connect(ODIHFMAppReverser.java:27)
         at com.hyperion.odi.common.ODIModelImporter.importModels(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    com.hyperion.odi.common.ODIHAppException: com.hyperion.odi.common.ODIHAppException: Error occurred while loading driver.
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
    File "<string>", line 38, in <module>
         at com.hyperion.odi.hfm.ODIHFMAppConnection.<init>(ODIHFMAppConnection.java:58)
         at com.hyperion.odi.hfm.ODIHFMAppReverser.connect(ODIHFMAppReverser.java:27)
         at com.hyperion.odi.common.ODIModelImporter.importModels(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    com.hyperion.odi.common.ODIHAppException: com.hyperion.odi.common.ODIHAppException: Error occurred while loading driver.
         at org.python.core.PyException.fillInStackTrace(PyException.java:70)
         at java.lang.Throwable.<init>(Throwable.java:181)
         at java.lang.Exception.<init>(Exception.java:29)
         at java.lang.RuntimeException.<init>(RuntimeException.java:32)
         at org.python.core.PyException.<init>(PyException.java:46)
         at org.python.core.PyException.<init>(PyException.java:43)
         at org.python.core.Py.JavaError(Py.java:455)
         at org.python.core.Py.JavaError(Py.java:448)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
         at org.python.core.PyObject.__call__(PyObject.java:355)
         at org.python.core.PyMethod.__call__(PyMethod.java:215)
         at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
         at org.python.core.PyMethod.__call__(PyMethod.java:206)
         at org.python.core.PyObject.__call__(PyObject.java:381)
         at org.python.core.PyObject.__call__(PyObject.java:385)
         at org.python.pycode._pyx1.f$0(<string>:38)
         at org.python.pycode._pyx1.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:165)
         at org.python.core.PyCode.call(PyCode.java:18)
         at org.python.core.Py.runCode(Py.java:1204)
         at org.python.core.Py.exec(Py.java:1248)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         ... 19 more
    Caused by: com.hyperion.odi.common.ODIHAppException: Error occurred while loading driver.
         at com.hyperion.odi.hfm.ODIHFMAppConnection.<init>(ODIHFMAppConnection.java:58)
         at com.hyperion.odi.hfm.ODIHFMAppReverser.connect(ODIHFMAppReverser.java:27)
         at com.hyperion.odi.common.ODIModelImporter.importModels(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
         ... 33 more
    Caused by: com.hyperion.odi.hfm.wrapper.HFMException: Error occurred while loading driver.
         at com.hyperion.odi.hfm.wrapper.HFMServer.<init>(HFMServer.java:29)
         at com.hyperion.odi.hfm.ODIHFMAppConnection.<init>(ODIHFMAppConnection.java:51)
         ... 40 more
    Caused by: com.hyperion.odi.hfm.wrapper.HFMException: no HFMDriver in java.library.path
         at com.hyperion.odi.hfm.wrapper.HFMDriverJNI.getDriver(HFMDriverJNI.java:23)
         at com.hyperion.odi.hfm.wrapper.HFMServer.<init>(HFMServer.java:26)
         ... 41 more
    please help me , thanks in advacne

  • ScriptLink tag not working for application page sharepoint 2010

    <ScriptLink> tag not working for application page sharepoint 2010 for including javascript in application page, it appends either 1033 or _layout to path specified for javascript.But javascripts are located in custom document library on site and not
    in _layouts folder.
    Please help and explain in details as I tried lot on this.

    Hi,
    Use the following line of code
    <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/functions.js" Language="javascript" />
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

  • Thunderbird Mission Control Desktop/AutoConfig not working for some users

    I have the file: "C:\Program Files (x86)\Mozilla Thunderbird\defaults\pref\custom.js"
    It contains:
    pref("general.config.obscure_value", 0);
    pref("general.config.filename", "TMcustom.cfg");
    I have the file: "C:\Program Files (x86)\Mozilla Thunderbird\TMcustom.cfg"
    It contains:
    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
    .getService(Components.interfaces.nsIPromptService);
    promptService.alert(null, "title", "testing");
    For most of my users the alert pops up fine when I start Thunderbird, but for a few it doesn't. All of the machines where setup with the same install script. If I log into one of the machines where it's not working as a different user, then it works fine, so I know the files are in the right spot. So why would it not work for specific users? Is there something in the user's Windows profile that could cause it to not work? Or are there any other suggestions?

    As it turns out this was a known bug that was corrected in the recent release of Java 7_65 and Java 8_11. Here is a link to the bug description in the database.
    Bug ID: JDK-8019274 RMI thread can no longer call out to AWT thread for webstart app

  • MAM application is not working for some users

    Hi All,
    Tha MAM application is not working for some users.Different users have different workcenters other than that I dont see any other change. When I run MAM30_090_GETLIST in the backend I can see the no of customized users.But I cant see same no of users in the MEREP_207 table for the Syncbo MAM30_090 and strcture id TOP in the middleware. There is a data when I checked under worklist monitor for that user. But neither the MAM application nor MAM data is downloading to that device.
    If I use different user on the same device I can see the MAM application and MAM data.
    What could be the wrong in this case. Any help would be highly appreciated.
    Mobile Client:MI 70 SP 15 Patch 0 Build 200802280918
    Middleware:SAP NetWeaver 2004s with Patch leve 15
    Backend:SAP ECC 6.0
    Application:MAM 3.0
    Thanks and Regards,
    Ameer.

    Hi,
    from your description the source of your issue is quite obvious: some of the MAM users configured in spro are not configured properly.
    For T01 SyncBos the number of TOP records in merep_207 MUST be the same as number of headers returned by an appropriate getList FM in the backend.
    You need to solve this before you can go any further.
    Reason why a record is not recorded in MEREP_207 - getdetail failed for whatever reason. So execute MAM30_ML_getdetail for each of the users that is not replicated in the middleware and check if there are errors in RETURN table. If there is no error - one of the common reason for replication fail is when there are records in item tables that have duplicate primary keys.
    Regards,
    Larissa Limarova

  • Auto_lexer (stemming) not working for other languages(other than english)

    Hi All,
    We are planning to use AUTO_LEXER instead of MULTI_LEXER and observed that stemming is not working for German where as it is working for English when I use AUTO_LEXER. I even used query templates but of no use.
    But when i use MULTI_LEXER, creating sub lexers for German and Enlgish, Stemming is working for German also after changing the session language and setting stemmer of wod list to German (Which is expected).
    Following is the code for AUTO_LEXER creation:
    CREATE TABLE test_auto_lexer(pkey NUMBER(5,0),
    lang_index VARCHAR2(3),
    content_text CLOB,
    CONSTRAINT test_auto_lexer_pk primary key (pkey))
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (1,'eng','I drive a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (2,'eng','I drove a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (3,'eng','I have driven a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (4,'eng','Just check for other things')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (5,'eng','always drive a car')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (6,'eng','it is nothing')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (7,'ger','Ich fahre ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (8,'ger','Ich fuhr ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (9,'ger','Ich habe ein Fahrrad gefahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (10,'ger','Aktivieren Sie einfach für andere Dinge')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (11,'ger','immer Auto fahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (12,'ger','es ist nichts')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (13,'ger','sprechen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (14,'ger','sprach')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (15,'ger','gesprochen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (16,'ger','tale')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (17,'ger','Indlæg')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (18,'ger','tales')
    BEGIN
    ctx_ddl.create_preference('auto_lexer1', 'auto_lexer');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','index_stems','yes');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','language','danish english german');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','alternate_spelling','german');
    END;
    CREATE INDEX test_auto_lexer_ix1
    ON test_auto_lexer(content_text)
    INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.direct_datastore filter ctxsys.null_filter lexer auto_lexer1')
    select to_char(content_Text) from test_auto_lexer where contains(content_text,
    '<query>
    <textquery lang="ger" grammar="context">
    $fahren
    </textquery>
    <score datatype="integer"/>
    </query>') > 0
    this doesnt work even after changing the session language. My default Sesson language is AMERICAN.
    Could any one help me with this, in case I am missing something here. I would be really thankful.
    Edited by: Nagendra Prasad on Jan 23, 2010 12:05 AM

    In the future, please begin a new thread for a new question and provide a link to a related question.
    According to the online documentation, Oracle only supports stemming for English, Dutch, French, German, Italian, Spanish, and Japanese. Oracle does not support Russian stemming, although you may have gotten some accidental results, due to identifying it as a different language and applying stemming rules for that language. The following manual sections show the languages available for the index_stems attribute of the basic_lexer and stemmer attribute of the basic_wordlist:
    Basic_lexer attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#CIHHBAAD
    Basic_wordlist attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#g1019326
    Also, please see the following note:
    Features not available in 11.2.0.3:
    http://docs.oracle.com/cd/E11882_01/readmes.112/e22488/toc.htm#BABDGGDB
    "Certain Oracle Text functionality based on third-party technologies, including AUTO_LEXER and CTX_ENTITY, have been disabled in this release (reference Bug 12618046). For BASIC_LEXER, the usage of the INDEX_STEMS attribute values that depend on third-party technologies, is also affected. If this impacts an existing application, contact Oracle Support Services for guidance."
    Also, the auto_lexer has been replaced by the world_lexer, which only has one attribute:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#BHCJEGFJ
    I don't work for Oracle, so I don't know why they do things the way they do.
    So, you need to stick with the basic_wordlist for stemming, not the lexers. However, you may get better performance by combining the multi_lexer with the basic_wordlist, as the multi_lexer eliminates time spent on automatic language detection. But, you need to remember not to use the index_stems with your lexer, since it will conflict with the wordlist. I am not experiencing any time problems as you have. Please see the demo below. I have provided the whole script below that, so that you can reproduce it on your system. If you still have problems, then it may be due to differences in versions.
    -- demo:
    SCOTT@orcl_11gR2> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl_11gR2> select value from v$nls_parameters
      2  where  parameter = 'NLS_CHARACTERSET'
      3  /
    VALUE
    AL32UTF8
    1 row selected.
    SCOTT@orcl_11gR2> DROP TABLE news
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> CREATE TABLE news
      2    (pkey            NUMBER,
      3       lang            VARCHAR2 (2),
      4       short_content  CLOB)
      5  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO news (pkey, lang, short_content)
      3    VALUES  (1, 'en', 'I drive a bike.')
      4  INTO news (pkey, lang, short_content)
      5    VALUES  (2, 'en', 'I drove a bike.')
      6  INTO news (pkey, lang, short_content)
      7    VALUES  (3, 'en', 'I have driven a bike.')
      8  INTO news (pkey, lang, short_content)
      9    VALUES  (4, 'en', 'I always drive a car')
    10  INTO news (pkey, lang, short_content)
    11    VALUES  (5, 'en', 'This is nothing')
    12  INTO news (pkey, lang, short_content)
    13    VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    14  INTO news (pkey, lang, short_content)
    15    VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    16  INTO news (pkey, lang, short_content)
    17    VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    18  INTO news (pkey, lang, short_content)
    19    VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    20  INTO news (pkey, lang, short_content)
    21    VALUES  (10, 'de', 'Es ist nichts.')
    22  SELECT * FROM DUAL
    23  /
    10 rows created.
    SCOTT@orcl_11gR2> BEGIN
      2    -- word list:
      3    ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      4    ctx_ddl.set_attribute      ('my_wordlist',   'stemmer',           'auto');
      5    -- english lexer:
      6    ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      7    -- german lexer:
      8    ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      9    ctx_ddl.set_attribute      ('german_lexer',  'composite',       'german');
    10    ctx_ddl.set_attribute      ('german_lexer',  'alternate_spelling', 'german');
    11    ctx_ddl.set_attribute      ('german_lexer',  'mixed_case',       'no');
    12    ctx_ddl.set_attribute      ('german_lexer',  'base_letter',       'yes');
    13    -- multi_lexer:
    14    ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
    15    ctx_ddl.add_sub_lexer      ('global_lexer',  'default',            'english_lexer');
    16    ctx_ddl.add_sub_lexer      ('global_lexer',  'german',            'german_lexer');
    17  END;
    18  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index search_news
      2  on news (short_content)
      3  indextype is ctxsys.context
      4  parameters
      5    ('lexer            global_lexer
      6        language column  lang
      7        wordlist       my_wordlist')
      8  /
    Index created.
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> COLUMN short_content FORMAT A30
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
      2  /
    Session altered.
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drive') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drove') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
      2  /
    Session altered.
    Elapsed: 00:00:00.01
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fahr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.07
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fuhr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.16-- script for you to reproduce the demo on your system:
    select * from v$version
    select value from v$nls_parameters
    where  parameter = 'NLS_CHARACTERSET'
    DROP TABLE news
    EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    CREATE TABLE news
      (pkey           NUMBER,
       lang           VARCHAR2 (2),
       short_content  CLOB)
    INSERT ALL
    INTO news (pkey, lang, short_content)
      VALUES  (1, 'en', 'I drive a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (2, 'en', 'I drove a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (3, 'en', 'I have driven a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (4, 'en', 'I always drive a car')
    INTO news (pkey, lang, short_content)
      VALUES  (5, 'en', 'This is nothing')
    INTO news (pkey, lang, short_content)
      VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (10, 'de', 'Es ist nichts.')
    SELECT * FROM DUAL
    BEGIN
      -- word list:
      ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      ctx_ddl.set_attribute     ('my_wordlist',   'stemmer',            'auto');
      -- english lexer:
      ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      -- german lexer:
      ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      ctx_ddl.set_attribute     ('german_lexer',  'composite',          'german');
      ctx_ddl.set_attribute     ('german_lexer',  'alternate_spelling', 'german');
      ctx_ddl.set_attribute     ('german_lexer',  'mixed_case',          'no');
      ctx_ddl.set_attribute     ('german_lexer',  'base_letter',         'yes');
      -- multi_lexer:
      ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'default',             'english_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'german',              'german_lexer');
    END;
    create index search_news
    on news (short_content)
    indextype is ctxsys.context
    parameters
      ('lexer            global_lexer
        language column  lang
        wordlist         my_wordlist')
    EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    COLUMN short_content FORMAT A30
    ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
    set timing on
    select * from news
    where  contains (short_content, '$drive') > 0
    select * from news
    where  contains (short_content, '$drove') > 0
    ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
    select * from news
    where  contains (short_content, '$fahr') > 0
    select * from news
    where  contains (short_content, '$fuhr') > 0
    /

Maybe you are looking for