Pass a parameter to a function to use AS the operator in

I'm trying to pass a parameter to a function that uses the LIKE '% name_in % ',.
I don't know how to use...

the setting is called "name_in".


Thanks in advance,
M

Hello

Mehrdad says:
I'm trying to pass a parameter to a function that uses the LIKE '% name_in % ',.
I don't know how to use...

the setting is called "name_in".

Your code should say:

... LIKE '%' || name_in || '%'

If name_in is inside the single quotes, it will mean the 7 characters literals 'n', 'a', ', 'e', '_', 'i' and 'n'.
You want to refer to the variable named name_id, in order to keep the name of the variable outside of the quotation marks.

Tags: Database

Similar Questions

  • Soeome has a list of all the regional settings valid which can be used in the operation of valid sendDocument API?

    I have to build a validadion on my side and I would like to know the complete list of 'local' valid codes that can be used in the operation of sendDocument API.

    Thank you!

    en_US, en_GB, de_DE, fr_FR, nl_NL, it_IT, fi_FI, da_DK, sv_SE, es_ES, nb_NO, nn_NO, no_NO, pt_BR, pt_PT, ru_RU, is_IS, ja_JP, zh_CN, zh_TW, ko_KR, pl_PL, in_ID, ms_MY, vi_VN, th_TH, en_US, tr_TR, ca_ES, eu_ES, hr_HR hu_HU, ro_RO, sk_SK, sl_SI, uk_UK

  • It's as possible use IN the operation in view criteria?

    I use Jdeveloper 11 g R (11.1.2.3) & weblogic 10 G

    In my pages, I use JSF & Facelet

    Hi all

    Is there a way to implement operator in view criteria?

    My requirement is just a seelcte like this:

    Select * from EMPLOYEES where EMPLOYEE_ID IN (2339,2340)

    I want 2339,2340 as the variable to view the object then apply view criteria and link

    the list of parameters is not fixed, so I need to use IN the operation

    Thank you

    Mohsen

    Yes, you can do it. Reading decompilation binary ADF: using bind variable for SQL statements with the paragraph

    which shows how.

    Timo

  • How to get a list of the methods and functions to use in the Transformation

    I am developing a transformation to apply the schema of a table in the relational model according to its type of classification. I was able to do this, but I have a doubt, in other words, how get the name of the first additional classification type, listed in the dropdown list of "Selected" of the "additional part" of the section "Types of Classification" of the table "Properties".

    This is the code that I'm working on:

    tables = model.getTableSet () .toArray ();

    for (var t = 0; t < tables.length; t ++) {}

    table = table [t];

    rating = table.getAdditionalClassificationTypes () .toArray ();

    SchemaName = ";

    {if (rating. Length = 0)}

    SchemaName = table.getClassificationType ();

    } else {}

    for (var s = 0; s < classif.length; s + +) {}

    {if (rating [s]! = table.getClassificationType ())}

    SchemaName = rating [s];

    }

    }

    }

    table.setSchema (schemaname);

    }

    The problem lies on the fact that I am able to get the ID of the Type of ranking, but not it's name...

    I was wondering if there is some document that lists the methods, functions, and namespaces that I could use in Data Modeler?

    Thanks in advance

    Wolf Goebel

    Wolf Hello,

    You can find the description of the API in the following directory:

    \datamodeler\datamodeler\xmlmetadata\doc

    Best regards

    Joop

  • Check where a function was used in the Apex 4.1.1

    Hello

    I wrote a defective function several months ago and have corrected. But not sure how many palaces that he is used to it because he is a big enough application and made some time back. Is there a mechanism within the APEX to check where a particular function is called (in proceesses, calculation, etc.)?

    Using Application Express 4.1.1.00.23

    See you soon,.

    Xarg,

    You should be able to use the application for this search. Simply go to the request of the manufacturer, change your request and put your name of the function in the search box in the upper right.

    -D.

  • How many processors the TimesTen on Exalytics can be used for the operation of 1 request?

    Dear

    I am analyzing the deployment scenario (2 t, 40 processors) Exalytics cluster - two machines.

    After reading the discussions on this forum and a part of the documentation available for my Oracle Partner login information.

    A doubt is:

    When you run SQL against TimesTen.

    To search for and return the data - OBIEE server, the TimesTen will use as many processors in this operation?

    Thank you

    MMB

    TimesTen (11.2.2) currently does not support a parallel query, so a single query will use one processor, but it will still be very fast because of the nature in memory of TimesTen. And you can run 40 these applications simultaneously without overloading the machine.

    Support for a parallel query is in our roadmap for a future version.

    Chris

  • The use of the operator &amp; quot; &amp; gt; &amp; quot; or &amp; quot; &amp; lt; &amp; quot;

    Hello

    I'm writing this code to determine the "activated" value of a button in mxml:

    < groupName = "idAddr" mx:RadioButton
    label = "address".
    labelPlacement = "right."
    Enabled = "{numPeople.SelectedIndex < 2}
    / >

    When I save, I get this error: ' the the 'active' attribute value must not contain the ' < ' character. "

    Can someone tell me why? And if not, how can I do to enable value?

    Thank you!



    Because of the rules for xml documents well trained.

    Use entities for common XML markup characters intersecting with mathematical symbols.

    http://www.evolt.org/article/A_Simple_Character_Entity_Chart/17/21234/

    <<><>< less-than="">
    > > sign grand superior

    It must be transformed into good math symbol Action script at compile time.

  • Conversion of language according to the use of the operating system.

    Hello

    I have a project in c generating a list of events that all events are in English and then I put these events alongside a db file,

    I want to run this project on another language (German/french) operating systems

    Now I want a c code which convert my french/German English test before sending the event to the db file.
    If possible please send me code as soon as possible
    Thank you:
    Sunil

    Hi Sunil,

    I suggest you post the same question in the Microsoft MSDN forum for assistance.

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • the use in the operator not to take value of list item

    Hi gurus,
    I have four types of employees
    such as 'C' for consultants, the from ' for the staffs, 'W' for workers, ('E', the of ',' W') for all types of employees.
    I write four queries to show four types of employees.
    can it is possible in a single query.

    Please guide me...

    I wrote this in oracle forms
    I took a list item for the workers, I took 'W', for the staffs, I took the of ' consultants, I took 'C' and for all I took 'A '.
    my column name is emp_type in (: block.list_item)
    but it does not have the value of the list item when the value is emp_type, in('C') etc etc...
    same for workers, the staffs.
    When he is 'A' it will be emp_type in ('E', the of ',' W')

    Please answer...

    where did you put that "emp_type in...". "- thing? In the WHERE clause of the blocks? Also, check the value of the SYSTEM. LAST_QUERY after the query has been run.

    Published by: Andreas Weiden on 07.07.2011 19:52

  • Is there a function "when used"?

    Bridge (CC) has a function "when used" for the linked files?

    If I have a graph related to several different InDesign documents, can bridge show me where the graph is used?

    Thank you.

    Hi Kalaka,

    I am not afraid. Bridge cannot display a list of files related to an identity document given when you target, which is in fact thanks to engineers in ID. He has no idea where you might have used each file. Be nice if there was something that could track down, wouldn't it?

  • How to pass the value entered for the parameter IN a function

    Hello
    I'm new to pl/sql programming.
    The function below is used inside a package and the package is called in visual studio.
    The function uses the input parameters 2.
    Out what "in_report_parameter_id" value comes through the application of service job processor.
    The second IN the parameter values are hard coded into the function.
    I am not able to understand this.
    If the values are hard coded, how to ensure that only the hard coded values are the right ones?
    Please could someone explain?
    I don't really have good idea on how to move the INPUT parameter to the function or procedure
    Is there any nice document that could give me good understanding about what are the ways or types we could transmit values to the input in the subprogrammes parameter?

    Thanks in advance.

    CREATE OR REPLACE FUNCTION get_class_text_str
    (
         in_report_parameter_id IN NUMBER,
         in_which                IN VARCHAR2 DEFAULT 'SELECT'
    )
    RETURN VARCHAR2
    IS
             end_text            VARCHAR2 (50)   := ''; 
             my_class_text_str  VARCHAR2(10000) := '';
             my_class_value_str VARCHAR2(10000) := '';
     
         CURSOR class_text(c_1_text VARCHAR2, c_2_text VARCHAR2) IS
         SELECT c_1_text || report_parameters.report_parameter_value 
                               || c_2_text
                               || report_parameters.report_parameter_value 
                               || '" '
          FROM report_parameters
         WHERE report_parameters.report_parameter_id     = 3690
           AND report_parameters.report_parameter_group  = 'CLASS'
           AND report_parameters.report_parameter_name   = 'CLASS'
     GROUP BY report_parameters.report_parameter_value
     ORDER BY CAST(report_parameters.report_parameter_value AS NUMBER);
     
    BEGIN
    
         IF (in_which = 'SUM') THEN     
      
              OPEN class_text ( 'SUM(NVL("Class ', '", 0)) "Class ' );
        
         ELSIF (in_which = 'PERC')THEN
      
              OPEN class_text ( 'ROUND((("Class ', '" / "Total") * 100), 2) "Class ' );
              end_text := ', DECODE("Total", -1, 0, 100) "Total" ';
        
         ELSE
      
              OPEN class_text ( 'SUM(DECODE(bin_id, ', ', bin_value, 0)) "Class ' );
        
         END IF;
     
         LOOP
              FETCH class_text INTO my_class_value_str;
              EXIT WHEN class_text%NOTFOUND;
     
              my_class_text_str := my_class_text_str || ', ' || my_class_value_str;
         END LOOP;
     
         CLOSE class_text;
      
         my_class_text_str := my_class_text_str || end_text;
     
         RETURN my_class_text_str;
         
    END get_class_text_str;
    /
    Published by: user10641405 on November 19, 2009 08:16

    Published by: user10641405 on November 19, 2009 08:30

    This is not a conception I would use, but should work if coded correctly. I would probably create a reference text cursor query and use a fetch of open and close.

    You have 2 input parameters, in_report_parameter_id and in_which. I could not find where in_report_parameter_id has been used in the program, but the value passed to in_which is used in the logic of the FI to decide on opening the cursor. After the cursor is opened lines are to be read and possibly the cursor is closed.

    The in_which values are compared to the are hard-coded. It is the programming interface to ensure that the values are the values and the measures taken are also correct. Your program is assuming that if the first 2 values are not met the third listed is the one you want.

    To pass values of entry in a procedure you simply provide the values as a literal or something like variable in the call,

    whatever := get_class_text_str(1,'SELECT');
    
  • Use of the staging of prepareBulk table name parameter / completeBulk functions.

    I try to load 1.6 billion triple in a semantic graph RDF instance. I use the prepareBulk / completeBulk approach described in "7.12 Bulk loading Using RDF graphic semantic support for Apache Jena. I loaded the triplets of. TTL.gz files in an intermediate table with prepareBulk according to the "example 7-10 loading data into the staging (prepareBulk) Table.

    Example 7-10, I used "null" for the parameter "staged by the name of the table" at prepareBulk. I then ran a separate program to run completeBulk according to the "example 7-11 loading data into the table of staging in semantic networks (completeBulk). 7-11 watch also the use of "null" as default value for the parameter "staged by the name of the table. PrepareBulk operations seem to have executed successfully with a null value, staging table name. However, null does not seem to be a valid entry for the staging of completeBulktable name parameter. "CompleteBulk (null, null);" run displays the following error message:

    Hit the exception ORA-00942: table or view does not exist

    What is the relationship between "staged by the name of the table" Settings prepareBulk and completeBulk? Is null, a valid value for this parameter to prepareBulk, and if so what should be the corresponding value passed to completeBulk?

    Hello

    This seems odd. We have a test for this case. We will try this. By default, the intermediate table created is under the same user schema and table name would be "RDFB_" followed by the name of model.

    Can you please verify the existence of such a table in your schema? There must be 1 b + lines. If so, you can directly proceed to the name of the table.

    Since you are dealing with a good amount of data, the following should be helpful for performance:

    (1) remove the indexes on the table of the application before you run the completeBulk call;
    2) enable parallel DML before the call: oracle.executeSQL ("alter session enable dml parallel");

    (3) use the parallel load options. An example is the following. Degree of parallelism is set to 4, and you will need to customize it to your own configuration.

    "PARSE PARALLEL PARALLEL_CREATE_INDEX = 4 mbv_method = shadow"

    Thank you

    Zhe Wu

  • SetCtrlVal used during the Thread function works causes memory leaks

    I am writing a program that works if... Or not work if... - see the next lines... :-)...

    The program includes a section, mostly GUI - and User Interaction.

    The other part is a DLL. In the DLL we readings on an external consultant controller RS232. Sometimes the controller card needs (called how much) time and this time must pass then the result can be read card controller... and so on...

    Blocking is not GUI-user-program for the expectation of the return value of the DLL functions (which need a few seconds to be finished) I start a thread in the DLL with

    CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, THREAD_FunctionX, & tmpTFP, NULL);

    with "tmpTFP" as an instance of type "TYPE_THREAD_FUNCTION_PARAMETERS":

    typedef struct
    {
    //
    int IntVal1;                // 1. Integer-Wert
    int IntVal2;                // 2. Integer-Wert
    int IntVal3;                // 3. Integer-Wert
    int IntVal4;                // 4. Integer-Wert
    int IntVal5;                // 5. Integer-Wert
    //
    int IntBuffer1 [32];            // 1. Integer-buffer (aktuell genugt einer)
    //
    Double DblVal1;                // 1. Double-value
    Double DblVal2;                // 2. Double-value
    Double DblVal3;                // 3. Double-value
    Double DblVal4;                // 4. Double-value
    Double DblVal5;                // 5. Double-value
    //
    char CharVal1;                // 1. (Single)- Tank-Wert
    char CharVal2;                // 2. (Single)- Tank-Wert
    char CharVal3;                // 3. (Single)- Tank-Wert
    char CharVal4;                // 4. (Single)- Tank-Wert
    char CharVal5;                // 5. (Single)- Tank-Wert
    //
    char CharBuffer1 [1024];        // 1. Char buffer (akutell einer genugt)
    //
    } TYPE_THREAD_FUNCTION_PARAMETERS;

    In the GUI-user program - I get fast by default-return value of the thread start function.

    Then I asked the DLL (some global state variables are used for this) when it is finished.

    According to the map-controller (RS232) contacted the waiting time depends on the 'mood' of the controller card.

    In the DLL-mark of the GUI-user-program routine now everything works fine - without using "SetCtrlVal!"

    In my GUI, there is a text box of the info/comment for messages. If I do a few outputs user using 'SetCtrlVal' I always errors, caused by the false "TYPE_THREAD_FUNCTION_PARAMETERS"-values in the service of thread. "» If I set a breakpoint at the beginning thread-function I see mostly erroneous values in my transfer structure variables. If I put a breakpoint in the thread-function-calling 'CmtScheduleThreadPoolFunction (...)"and at the beginning of the thread values are (mostly) correct!

    I tried several and different things - but:

    If I ONLY (!)  Commenting on the (!) of a line with "SetCtrlVal", the program works, all States are asked out of the DLL.

    If I replace the "SetCtrlVal" with a written record-file function clean everything works fine and after completing the program I can look at the log file and see all the user information. BUT with 'SetCtrlVal' instead or set or (...) it does not work.

    My description is maybe not entirely clear, but believe me: only ONE line the «SetCtrlVal "line - should be commented out to let the program run properly!»

    Because if the line "SetCtrlVal"is program-user-GUI, after the call to the thread in the DLL, the DLL-memory seems to be corrupted by the call "SetCtrlVal" in the user-GUI program.»

    Best regards

    F.

    There may be a problem in your structure that your variable is set.

    You said that, after the address of the variable in the thread function the appellant one ends. Now, as you can read help each value passed in parameter threadFunctionData of the layed function must point to an area of memory that persist when the fuction is running: If your variable is defined at the level of the functions it is not valid when the thread runs since the appellant finished and released its local memory.

    Your approach with a global variable is a valid alternative, but if it is the solution, you will find data passed to the thread function must be valid for all his life.

  • How to pass a pointer in calling labview library using dll programmed in Labwindows?

    Hello

    I'm trying to interface a camera with Labview.  However, the camera can only be programmed in C, so I use Labwindow CVI.

    I need to pass a handle from the camera of a function to another, for example. leave an opencamera function to function setparameter.

    / * Loading the Qcam driver and open the first camera * /.
    Sub DLLEXPORT LoadDriverAndOpenCamera()
    {
    QCam_CamListItem cameraList [10];
    unsigned long cameraListLength is sizeof (cameraList) /sizeof(cameraList[0]);.

    load the driver
    QCam_LoadDriver();
    a list of cameras
    QCam_ListCameras (cameraList, & cameraListLength);
    listLength is now the number of available cameras

    QCam_Handle CMAH;
    Open the first camera in the list
    QCam_OpenCamera (cameraList [0] .cameraId, &hCam);)
    }

    Apparently, the caemraId is a long unsigned (unsigned 32-bit by 32-bit Labview 2012?) and QCam_Handle is defined as void *, so it is a pointer that points to a non signed 32 bit.

    When I only use C for programming, I can pass variable CMAH to other duties so it is declared as a global variable.  Ex, the following function can be Sub SetParameter(QCam_Handle hCam).  However, here, I trying to do a Labwindows/CVI dll and then call LoadDriverAndOpenCamera() through library function call in Labview.

    My question is: How can I switch CMAH to other functions in the same dll?  I have to add the parameter to the function? For example:

    Sub DLLEXPORT LoadDriverAndOpenCamera(unsigned long cameraId, QCam_Handle* cameraHandle)

    And then add two lines:

    cameraId = cameraList [0] .cameraId;
    cameraHandle = CMAH;

    in the service?  So I spend cameraHandle out?  However, the CMAH will always have kind of vacuum.

    Even if this is the case, how can I configure node call library on Labview?  In the arg parameter set up, I do not see pointers?  It seems that I can not put in place an exit node to be a pointer that points to an unsigned long.

    Thank you very much for your help!

    Best,

    Charles

    Hello Charles,

    I noticed that you posted something similar here. you have questions about the use of the call library function node?

  • Correct use of the function in the pipeline?

    Hello

    I have a function in the pipeline, I am using 11 g. the idea is I can pass in the name of a table, and it returns a set of rowcounts for this table

    I obviously have something wrong, but what?

    -Package

    create or replace PACKAGE IS GetMigSamples

    -set types for a record and an array of records like this

    TYPE sample_record IS RECORD)

    PERSON_ID NUMBER,

    CF_ID VARCHAR2 (10),

    number_of_records NUMBER);

    TYPE sample_table IS the TABLE OF THE sample_record;

    FUNCTION SP_MIG_SAMPLES (P_TABLE IN VARCHAR)

    RETURN sample_table

    IN PIPELINE;

    END;

    -Package body

    create or replace PACKAGE GetMigSamples BODY IS

    FUNCTION SP_MIG_SAMPLES (P_TABLE IN VARCHAR) sample_table RETURN PIPELINED IS

    v_cur sys_refcursor;

    v_rec sample_record;

    v_migtable VARCHAR (64);

    v_stmt_str VARCHAR2 (400);

    v_col VARCHAR (64);

    BEGIN

    v_migtable: = P_TABLE;

    -some tables have a different name for the foreign key column

    v_col: = box

    When v_migtable = "MYTABLE" then "MAIN_ID".

    another end 'PERSON_ID ';

    -build a sql query for this table and the foreign key column

    v_stmt_str: = ' SELECT

    MX.' | v_col |' like PERSON_ID,.

    COALESCE (MX. Reference, "?") as CF_ID,.

    Count (*) as number_of_records

    OF ' | P_TABLE |' mx

    GROUP BY mx.' | v_col;

    -Open the query and loop through it, each line of pipes

    Open the v_cur for v_stmt_str;

    LOOP

    EXTRACTION v_cur

    IN v_rec;

    EXIT WHEN v_cur % NOTFOUND;

    PIPE ROW (v_rec);

    END LOOP;

    CLOSE V_cur;

    RETURN;

    End;

    END GetMigSamples;

    When I use it

    Select getmigsamples.sp_mig_samples ('M_MY_TABLE') of double

    I get

    FW. SYS_PLSQL_228255_29_1()

    Which I guess means that I have a reference to an object, rather than the actual values in the lines. I tried to corrrect it for centuries and have now arrived at the point of the tear-my-hair-out. Can anyone help please?

    Thank you

    When I use it

    Select getmigsamples.sp_mig_samples ('M_MY_TABLE') of double

    I get

    FW. SYS_PLSQL_228255_29_1()

    Which I guess means that I have a reference to an object, rather than the actual values in the lines. I tried to corrrect it for centuries and have now arrived at the point of the tear-my-hair-out.

    No - this 'thing' you got is a hidden type of SQL Oracle automatically created to match the type of PL/SQL, that you used. SQL can only work with the SQL types defined at the schema level. But for functions PIPELINED Oracle allows you to specify the types of PL/SQL and it will create SQL HIDDEN types to make it work.

    A pipeline function should be treated as a table. You must use the SCOREBOARD operator

    Select * from table (myFunction);

    Try this simple example

    -type to match record emp

    create or replace type emp_scalar_type as an object

    (EMPNO NUMBER 4,

    ENAME VARCHAR2 (10),

    USE VARCHAR2 (9).

    MGR NUMBER 4,

    HIREDATE DATE,

    NUMBER OF SAL (7, 2)

    NUMBER OF COMM (7, 2)

    DEPTNO NUMBER (2)

    )

    /

    -records of the emp table

    create or replace type emp_table_type to table of emp_scalar_type

    /

    -function of pipelined

    create or replace function get_emp (p_deptno number)

    return emp_table_type

    PIPELINED

    as

    TYPE EmpCurTyp IS REF CURSOR RETURN emp % ROWTYPE;

    emp_cv EmpCurTyp;

    l_rec emp % rowtype;

    Start

    Open emp_cv SELECT * from emp where deptno = p_deptno;

    loop

    extract the emp_cv in l_rec;

    When the output (emp_cv % notfound);

    line of conduct (emp_scalar_type (l_rec.empno, LOWER (l_rec.ename),

    l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno));

    end loop;

    return;

    end;

    /

    Select * from table (get_emp (20))

    See use of the SCOREBOARD operator?

Maybe you are looking for