by passing the variable char in the sliders

HI I try to move the tank for the cursor variable, but it is not taking, if I hardcode the values of the slider that he takes

Here's detailed... any body can say why it is not taken and tell me how to pass the values through it...

declare
v_Name tank (6);
cursor c1 (c_name tank) is
Select name, parent, child, relationship status
First name = '% '.
Connect prior parent child =
Union
Select name, parent, child, relationship status
First name = '% '.
connect by prior child = parent
order by 2;
v_c1 c1% rowtype;
Start
v_Name: = ('A');
Open c1 (v_name); - here the value of v_name does not... If like hard-code open c1('c'); then work... I need to pass - value not hardcode
Fetch c1 in v_c1;
dbms_output.put_line (v_Name);
dbms_output.put_line (' name ' |' parent ' |' child ' | ' status "");
While c1%
loop
dbms_output.put_line (v_c1.name |) » '|| v_c1.parent | | » '|| v_c1. Child | | » '|| v_c1. Status);
Fetch c1 in v_c1;
end loop;
Close c1;
en

Try it with a varchar2 variable (6)

declare
v_name varchar2(6) ;
cursor c1(c_name varchar2) is
select name, parent,child,status from relation
start with name='%'
connect by prior parent=child
union
select name, parent, child , status from relation
start with name='%'
connect by prior child=parent
order by 2;
v_c1 c1%rowtype;
begin
v_name :=('A');
open c1(v_name);---Here the v_name value is not taking.. if hardcode like open c1('c') ; then working.. i need to pass -- value not hardcode
fetch c1 into v_c1;
dbms_output.put_line(v_name);
dbms_output.put_line('name '||'parent '||'child '||'status ');
while c1%found
loop
dbms_output.put_line(v_c1.name||' '||v_c1.parent||' '|| v_c1.child||' '||v_c1.status);
fetch c1 into v_c1;
end loop;
close c1;
end

Tags: Database

Similar Questions

  • Hello. How can I pass a variable as the name of file in writeStringToFile.

    When I try to pass a variable as writeStringToFile it is ignored.

    For example:

    getVariables () .set ("ts", "{{@today (YYYYMMddHHmmss)}}", Variables.Scope.GLOBAL);

    Path String = "C:\\OracleATS\\OFT\\Databank\\";

    String file = "test .csv {{ts}}";

    String completedOrders = path + file;

    Info (completedOrders);

    utilities.getFileService (.writeStringToFile) (file, "CreatedDate, customer, iteration, OrderNumber" + "\n");

    In the previous case.

    a. the console returns the correct file name: C:\OracleATS\OFT\Databank\test20151005133343.csv

    b. the file system will not be: test .csv {{ts}}

    Thank you for taking the time to consider the issue. I found another way to achieve this. It must be as follows:

    Import:

    import java.util.Date;

    import impossible;

    Format of date as follows:

    Path String = "C:\\OracleATS\\OFT\\Databank\\";

    String file = new SimpleDateFormat("'scriptOut_'YYYYMMddHHmmss'.csv'").format (new Date());

    String completedOrders = path + file;

    Info (completedOrders);

    utilities.getFileService () .writeStringToFile (completedOrders, 'CreatedDate, customer, iteration, OrderNumber "+" \n");

  • @HspNumToString () cannot pass the variable as a parameter?

    Hi all

    I create a rule that uses @HspNumToString () and pass a variable as a parameter.

    But it gives error on validation below the code associated with the @HspNumToString function.

    Var itemCounter = 1;

    ...

    DIFFICULTY ({UserEntity}, {period}: Dec,@MEMBER (@CONCATENATE ("Item", @HspNumToString (itemCounter))))

    ...

    ENDFIX

    and the error message is:

    "Error: formula [statement of DIFFICULTY] (line 97) parse error: invalid object type rule.

    IF I move a number as a parameter to @HspNumToString (), for example @HspNumToString (2) then the rule will be valid.

    Any suggestion?  Calculation Manager version is 11.1.2.4.001

    Best regards, Brian

    Hello

    I'm afraid that's how it is. You cannot use variables of calculation in trouble.

    Instead, you can set a static member of this dimension (i.e. "no element") and by your use of calculation an operator cross dimensional to calculate the item desired.

    See you soon,.

    Alp

  • How to pass the value of a column to a variable to be used in another analysis

    Hello

    I'm on OBIEE 11.1.1.7.1.

    I have the following problem.

    I have DISCOVERED called analysis. It has just a column with the result. Simple. Assume that the answer is 2500

    I have another scan which has two other columns, namely GOLD and LOANS. I want to calculate the total DISCOVERED + GOLD + READY.

    That's why I need to pass the value of 2500 of the first analysis of the second analysis via a variable.

    I can not add all three of them in the same analysis there are various filters for OVERDRAFT, and the application of these filters on the GOLD and LOANS gives the desired result. I tried to add filters in the column of the overdraft, but that doesn't seem to work.

    Any help will be greatly appreciated.

    I'll give you an example. I hope that you will mark for my time...

    Hope that you will be aware of how to combine a similar request.

    in the first criterion you have

    Goldprice Loanamount year 0

    Second criterion

    Year 0 0 Overdraftamount

    the two maintain the necessary filters.

    Add a column of result (option you can see in the topic area pane) that add all three columns. You can choose the columns. formula will come something like below

    saw_1 + saw_2 + saw_3

    Thank you

    AJ

  • How to pass the PHP variable to menu jQuery Modal popup

    Hello

    Need help to find how to pass a variable in php (which is recovered in a while loop) in a modal window.

    There is a list of users on the page (shown with a while loop), with buttons Remove next to each of them.

    When the administrator clicks the button Delete for that specific user, a modal window appears confirming their action.

    I can't find a simple way to communicate the id of the user to be removed the modal (where the query is performed, once 'Yes to confirm deletion' is clicked).

    I deleted the jQuery, seeing as how this could change how the modal opens and closes.

    This is the modal:

    < div class = "modal" >

    < div class = "modal_wrapper" >

    < div class = "modal_title" > are you sure you want to delete this user? < / div >

    < div class = "modal_content" >

    < div class = "modal_button_no" > n < / div >

    < div class = "modal_button_yes" > Yes, delete it < / div >

    < / div >

    < / div >

    < / div >

    < div class = "delete_btn" > delete user < / div >

    The variable with the user name is:

    $user_id

    Any help would be much appreciated!

    Thank you

    It is a fairly simple procedure. Personally I'm not sure that its worth the effort for a box of administration but good we all have different opinions - there is no wrong or it.

    Suppose that your buttons delete on your page are anchor tags and you have locked down your database of names to create anchor tags. The value of dir below has been inserted via php through loop and is your RegID.

    Delete

    Delete

    Delete

    Delete

    When you click the anchor tag (that class name "delete") opens a lightbox. You also have to collect the value of "dir" at the time the lightbox opens - happening of value to a hidden in the lighbox code entry field.

    The value of the "dir" command is passed to the light table in a hidden form field:

    "You have a delete button in the light table with the class of ' delete_record ':

    Delete the record

    When the user clicks on the button Delete in the light table the value of hidden form field is harvested and forwarded to your page of delete_record.php via the jquery/ajax script below, were also on the same page.

    Your delete_record.php would look like below, assuming that you use mysqli or if you are using mysql then you would follow the same delete procedure as usual.

    <>

    $conn = new mysqli ('localhost', 'root', 'root', 'name');

    {if ($conn-> connect_errno)}

    echo $conn-> connect_error;

    Die (' sorry, can not connect to the moment, try again later ');

    }

    ?>

    <>

    delete the record

    $record_id = $conn-> real_escape_string (stripslashes (trim($_POST['record_id'])));

    $conn-> query ("' DELETE FROM names WHERE record_id = ' $record_id ' '");

    $record_deleted = "true";

    ?>

    An alert box will appear at the end, confirming that the record has been deleted. You do not have to deploy an ugly alert box - you sends the data to the device of light therapy from the delete_record.php page in a few nice melted in

    If you want to be more subtle about it.

  • Passing the form variables to a thank you page.

    Hi all

    I have put code in place so my survey form transmitting data hidden on a confirmation page and displays the appropriate data. for example

    tag_reportid = 222776

    tag_displayname = Point 26



    My form script is:

    " < form name ="catwebformform3235"method ="post"onsubmit ="return checkWholeForm3235 (this)"enctype =" multipart/form-data"action =" https://BAFs.worldsecuresystems.com/FormProcessv2.aspx?WebFormID=72629 & pageid = %2thankyou.htm? name = {tag_reportid} & amp; titlename = {tag_displayname} & amp; OID = {module_oid} & amp; OTYPE = {module_otype} & amp; EID = {module_eid} & amp; CID = {module_cid} & amp; CC = {module_urlcountrycode} & amp; Sponsor = {module_siteurl, true, true} ">"

    What I see on the receipt/thank you page, is that only the name field has been spent... thankyou.htm? name = 222776,... then it is not passing the titlename field.

    In fact, it seems that it won't any variable after this first field 'name '.

    How can I get the form to send any variable I need more on page of thanks? Thanks in advance.

    Sure thing if your not comfortable with javascript, I created this one liner for you and an example of work (I wrapped the shape with a border of style so that you can see on the page, obviously to remove when you want to go live). I coded only the first two points, if you find that you do others (of course), and then wrap them also.

    Form here

    Example:

    https://jsfiddle.NET/rsy9bxyp/1/

  • How to pass a variable to the nearby operator

    Hello! does anyone know how can I pass a variable to the proximity operator?

    with this query variable1 and variable2 are read as words, not as variables.

    SELECT *.
    FROM t1
    WHERE CONTAINS
    (essay, "near ((variable1, variable2), 1)'") > 0;

    Thank you!

    Best regards
    Sara

    You may not use a link within a string variable. This is not a restriction of Oracle text, it's just the way bind variable work in Oracle.

    You can build a string literals and variables, although, like this:

    SELECT *
    FROM t1
    WHERE CONTAINS
    (test, 'near(('||:variable1||', '||:variable2||'), 1)') > 0; 
    
  • How do I pass a variable from the edge animate to an external JS?

    I need to pass a variable value of edge animate to an external JS file. How can I do?

    Not sure if this is the best way, but works

    The value of the variable as a property of a global variable

    As

    SET

    window.myVar = 'your value. "

    AdobeEdge.myVar = 'your value. "

    Read

    window.myVar

    AdobeEdge.myVar

  • Pass the value of the variable during execution

    Hello

    I have a package with a set of interfaces and three other variables.

    I want to pass the value of the variable at runtime, based on the value passed I want to decide which interface to run then. How can I do this? I got a set variable but I want to asssign the value during execution.

    Any help is greatly appreciated.


    Thank you
    San

    You have many options to achieve this goal.

    1. keep the run settings in the database, extract the Variables in a time of refreshment and use these variables in your Interfaces to get values of execution.

    2. change the value to the variables on the outside. You can declare a variable in a package as a step of the statement, and then use the variable in your interface in a successive step in your package. Then, create a scenario of your package and creating the scenario, it will prompt you to include the variables that you want to include as a startup parameter. Choose the one (s) concerned. Citing this scenario using Java or an OdiStartScen command or by using Webservices ODI externally, you can provide values of the runtime as a result.

    I hope this helps.

    Concerning
    A

    Published by: 922636 on August 29, 2012 23:53

  • Pass the Shell script variable to the plsql block

    Hello
    I have a shell script and pass the parameter of Shell script in a PLSQL block, I use the code but impossible to get any result, below
    Can someone help me with this issue?

    Shell script: test.sh


    * #! / bin/sh *.

    var1 = $1

    SQLPLUS = 'sqlplus-s ".
    Login = "gmisowner/gmisowner1".

    day ='$SQLPLUS $LOGON < < ++
    set the position
    Set feedback off

    Start
    select count () from mis_ref_codes where ref_description = & var1; *

    end;

    "exit";
    ++`

    echo $day

    Execution at the command prompt: >./test.sh Underline
    returns nothing

    1. I was hoping the count (*) in the number of lines in him select statement is stored in the day, but nothing returned as output of the plsql block
    the select statement above is an example, but I'll have to run a much larger plsql block

    I have syntactically doing something wrong? Please suggest

    Published by: Camilla January 14, 2012 12:35

    First of all you needget get rid of anonymous PL/SQL block:

    var1=$1
    
    SQLPLUS="sqlplus -s"
    LOGON="gmisowner/gmisowner1"
    
    day=`$SQLPLUS $LOGON <<++
    set heading off
    set feedback off
    select count(*) from mis_ref_codes where ref_description=&var1;
    exit;
    ++`
    echo $day
    

    But it still does not work. Your SQL * more script a proxy & var1. It has nothing to do with shel environment variable var1. That is why SQL * PLus prompts you to enter the value just after she readings

    Select count (*) in the mis_ref_codes where ref_description = &var1;

    And since you redirected input to your script, you must put value of var1, which isn't what you want, right? So what you need is:

    dev > # I'll set $1 to X
    dev > set X
    dev > var1 = $1
    dev > SQLPLUS = 'sqlplus-s ".
    dev > login = ' / '.
    dev > ='$SQLPLUS $LOGON < < EOF
    > set position
    > leave your comments
    > set verify off
    > select ' Have a nice day! "twice where dummy ="$var1 ";
    > "exit";
    > EOF'
    dev > echo $day
    Good day!
    dev >

    SY.

    Published by: Solomon Yakobson on 13 January 2012 15:17

  • How can I build and pass a variable to the function getField?

    I need to know how to build and pass a variable to the function getField():

    I have a form of several sections similar to a spreadsheet.  Each section contains 5 rows of 11 columns.  Currently I have calculations in the field I want to consolidate and move to the level of the document.  The field names in each column are identical except for a row identifier.  For example, in the 1st row: a_debtType1, a_debtTerm1, adebtRate1, etc.  I want to be able to pass to a function of level document line identifier and that connect a function "getField.  Here is an example:

    Document-level:

    function calculateLoan (lineNumber) {}

    var myDate = getField("a_debtType"+lineNumber).valueAsString;

    var myDate = getField("a_debtTerm"+lineNumber).valueAsString;

    .. few treatment

    return

    }

    Level of the form:

    change the information in the form is ready for line 1

    function calculateLoan("1");

    Thanks in advance for any help.

    It seems good except how you call the function of what you have. The calculation script should be something like:

    Custom calculate script

    calculateLoan("1");

    Note that you can also get the line number if it is contained in behalf of the field that calls the script if you don't disturb him passing as parameter, assuming you named the fields correctly.

    For example, to calculate the field is called "row_total.1", you can get the line number in the script like this:

    var no_lig = event.target.name.split(".") [1] ;

  • pass the name of symbol instance variable

    Hi all

    I'm trying to find a way to pass the instance name (ID) of an object selected in a variable, so I can navigate on a label on the timeline of the same name.

    So far, I tried different variations of:

    sym.getSymbol () //logs as "not defined".

    sym.getSymbolTypeName / / stores the name of the symbol in the library, not to the instance

    Any ideas?

    Thank you

    -Dave

    Hi David,

    You can use "e.target.id" on your button click event to get div id of the button.

    Alert (e.Target.ID);

    The weird thing only is that it seems to add "Stage_" value, so if your div button is called "myButton", the foregoing will alert you "Stage_myButton".

  • Pass a variable to the main class to a MovieClip

    Hello!

    I have a document with the main class.

    I have also a few clips that have their own class and functions.

    I'm trying to pass a variable in my main class to one of these clips.

    I tried a few things, nothing has worked.

    Who can help?

    Match_Easy looks like a class name.  You must use the name of the instance.

  • ODI 11 g | Passing the value of the variable ODI option procedure

    Hi Experts,

    I need to pass the value of the global variable / project to an option of the procedure and in the application of the procedure to retrieve. Procedure will be implemented in jython.

    How can I pass the value of the variable option procedure ODI & then retrieve it in the jython script?

    Model data source is the flat file based & I want to retrieve the location of the source directory using jython/java (must implement an on file preprocessing step before calling the interface to load). Is there an ODI API to retrieve the location of the source directory?

    Thank you
    Ashish

    The reason OdiGetOption won't work because odigetoption running will search for the name of the variable where like everything using the execution variable will look at the value of the variable.
    In order to manage your situation i belive, we can establish by using the combination of getoption and global variable using the if condition

    You can write code something like that
    If odigetoption == 'dat ':
    ctrlfileExt = #v_CtrlFileExt
    If odigetoption == "txt":
    ctrlfileExt = #v_CtrlFileExtTxt

    This way, when you call the procedure, you can supply the value of the extension and procedure will use the right variable and the value.

    I hope this helps.

  • By passing the package variables to the package...

    Hello world

    I have the following problem:

    Package A compiled in scenario A - not referencing not date of process.
    Package B compiled in scenario B with declare the flow variable called ProcessDate.
    Package MAIN calling declare variable ProcessDate, then calling scenario A, then B Scenario and then ENDS.

    MAIN scenario created with the ProcessDate startup parameter.

    So I want to start the MAIN scenario, with a parameter to ProcessDate. He asks me for the setting, but then scenario B fails as if he did not get the parameter. However, when I run the only TI, scenario B works very well after asking for the value of the parameter.

    any help appreciated.
    Thank you!
    Nick

    Hi Nick,

    When you drop scenario B in the main package, please do not forget to pass the variable processdate to scenario B. This can be done by using the additional Variables tab in the scenario using the menu drop down.

    Thank you
    Ritika

Maybe you are looking for