Why assign variable doesn't work

In my test in sqlplus:
variable testa number;
select max(length(name)) into :testa from myschema.tabletest;MAX(LENGTH(NAME))
6
print :testa;TESTA
----------

You have to assign the value in pl/sql:
SQL> begin
  2  select 5 into :testa from dual;
  3  end;
  4  /
Procedura PL/SQL completata correttamente.
SQL> print testa
     TESTA
         5Max
http://oracleitalia.wordpress.com

Similar Messages

  • In human task, dynamically assign group doesn't work

    Oracle SOA 11.1.1.4
    My bpel process invokes a human task.
    On the human task Assignment tab, I assigned 3 users (by name), 1 group (by expression).
    The group is configured in LDAP
    When I tested the bpel process, I entered the group and other data required.
    From the worklist app, I see the task listed. It is assigned to the 3 users, but not the dynamically passed-in group.
    From the Audit trail, I saw all data I entered (include the group). Everything seems correct, but I still can’t make the dynamically-pass-group work.
    If I assign the group by name in human task, it works fine.
    The problem is: dynamically assign group doesn't work.
    Please kindly advice.

    Yes, it is possible assign a group as participant of some human task, passing the group name as parameter.
    I have tested just now.
    It works pretty well in SOA 11.1.1.4 (BPEL or BPM).
    Make sure add a data parameter in your human task definition and pass a valid group name to it.
    At the Assignment tab, in the participants' list, add a group, data type by expression, and set the value to the right xpath expression to the corresponding parameter.
    For example: /task:task/task:payload/task:group
    If it is not working look the SOA log files, probably you'll find some information about the error there. Maybe there is some problem with your jazn.com configuration.
    You can also test if there is something wrong related to the group name, trying to transfer some task to the same group by the worklist.

  • Why the preloader doesn't work in IE 8 but works in FireFox?

    Why the preloader doesn't work in IE 8 but works in FireFox?
    Please see the attached files.  Thanks in advance.

    Why doesn't the preloader work in IE8?
    What's "virtual sandbox"?

  • How to use documentbeforesaved method? And why my code doesn't work in template files?

    Can someone help me with these two codes?
    ----Beginning of code 1-------------
    Private WithEvents App As Word.Application
    Private Sub Document_Open()
    Set App = Word.Application
    End Sub
    Private Sub App_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
    MsgBox("BeforeSave")
    End Sub
    --------------End of the code----------------
    Beginning of code 2--------------- Code 2 is from https://msdn.microsoft.com/en-us/library/office/ff838299(v=office.15).aspx
    Public WithEvents appWord as Word.Application 
    Private Sub appWord_DocumentBeforeSave _ 
     (ByVal Doc As Document, _ 
     SaveAsUI As Boolean, _ 
     Cancel As Boolean) 
     Dim intResponse As Integer 
    Private Sub App_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
    MsgBox("BeforeSave")
    End Sub
    In the first code, they have:
    Private Sub Document_Open()
    Set App = Word.Application
    End Sub
     I test these two codes in "This document" object, and I find out the first code works but the second code are not!
    Why second code doesn't work?
    Extra question: I am using microsoft 2013. I insert this code into a macro-enabled template. But when I am about to save my file I am expecting these code works. However, they didn't work!
    Thank you for solving these problem for me!

    Hello,
    Please note that the code snippet 2 in your post is different from the code snippet in the MSDN document. Also please read the comments of the MSDN code sample:
    This example prompts the user for a   yes or no response before saving any document.
    This code must be placed in a   class module, and an instance of the class must be correctly initialized to   see this example work; see
    Using Events with the Application Object for   directions on how to accomplish this.
    Public WithEvents appWord   as Word.Application
    Private Sub   appWord_DocumentBeforeSave _
     (ByVal Doc As Document, _
     SaveAsUI As Boolean, _
     Cancel As Boolean)
     Dim intResponse As Integer
     intResponse = MsgBox("Do you really   want to " _
     & "save the document?", _
     vbYesNo)
     If intResponse = vbNo Then Cancel = True
    End Sub
    So the problem in your code snippet 2 is that you didn't put it into a class module and initialize the class module. If you just put it into ThisDocument, you have to initialize the word application object.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Hi , please tell me why my ipod doesn't work ... when i conect it to my pc nothing happen .. and i can turn on my ipod .. why ? please help me

    hi , please tell me why my ipod doesn't work ... when i conect it to my pc nothing happen .. and i can turn on my ipod .. why ? please help me

    Go to
    http://bt.custhelp.com/app/answers/detail/a_id/47531
    and follow the instructions
    This was put up by BT several months ago as part of the advance notification that the Yahoo service through them was closing

  • Why the imsg doesn't work without a sim card with iOS 7???

    Why the imsg doesn't work without a sim card with iOS 7???

    If it worked for you using iOS 6, then it appears iOS 7 has made some changes.  Was it working before?

  • Hi there, i have a ipod nano general 7, just used one year. Now can't charge battery. When charging, the icon shows full power, but disconnect it. It becomes dark, no power. Why, the battery doesn't work ?

    I've a ipod nano general 7, I've just used it one year. Now, I can't charge the battery. When charging, the icon shows full power. But when I disconnect, the ipod becomes dark, no power is keeped. Why, the battery doesn't work ? the life of my ipod's battery is too short ? 

    Howdy tamsg,
    Welcome to Apple Support Communities.
    The article linked below provides a lot of great troubleshooting tips that can help you resolve the issue with your iPod nano charging or displaying a blank black screen.
    iPod nano (7th generation): Hardware troubleshooting - Apple Support
    So long,
    -Jason

  • Self-assigned or Manually Assigned IP Doesn't Work.

    I've got a network of four Macs in my house, using a wireless router from Verizon. This network has been working fine for at least a year. For the last week, though, my MBP can't access the internet or see other computers. My router recognizes the MBP and the MBP shows full bars for the wireless signal, but other than that, nada. This is true whether it's a self-assigned IP or I manually create the IP (using the IP address that the router recognizes as the MBP).
    The MBP hasn't left the house. The entire network set up has not changed.
    I have tried:
    - Manually setting the IP - worked briefly last night, but now doesn't work again.
    - Resetting nvram - didn't work at all
    - Power cycling computers and router in all possible permutations
    - I may have tried other things that I'm not thinking of now
    Any fixes or info on why this kind of thing happens would be greatly appreciated.

    cmoorhead wrote:
    For the last week, though, my MBP can't access the internet or see other computers.
    You might try resetting your connection settings using the steps listed in this message:
    http://discussions.apple.com/thread.jspa?messageID=10695921&start=1
    They're not guaranteed to solve the problem, but they'll only take you a minute or so to try.

  • USER Exit variable doesn't work in BSP

    Hi gurus
    I made a characteristic variable with user-exit replacement type.
    It get the user id from sy-uname. It works well in Gui version. But when I execute the layout in BSP (WI), it doesn't work.
    But If i do the hard-coding the line from (l_eto_charsel-low   = uid.) to (l_eto_charsel-low   = '4012121'.) it works well.
    The following is my coding.
    Please give me any comment.
      CLEAR eto_charsel.
      DATA l_eto_charsel TYPE upc_ys_charsel.
      DATA  uid type c. "(also I have tried 'data uid type sy-uname')
      uid = sy-uname.
      l_eto_charsel-chanm = i_chanm.
      l_eto_charsel-seqno = '0001'.
      l_eto_charsel-sign  = 'I'.
      l_eto_charsel-opt   = 'EQ'.
      l_eto_charsel-low   = uid.  ++++>
      INSERT l_eto_charsel INTO TABLE eto_charsel.
    ENDFUNCTION.
    Message was edited by: Bryan Lee

    Hi,
    Your patch level seems to be OK.
    pls. try the declaration as 'Data: uid like syst-uname' or you could try directly assigning the sy-uname.
    Try to debug and see the content of the sy-uname, when it hits this code.
    HTH,
    Regards,
    Nataraj.

  • [BUG]: af:commandButton rendered with requestScope variable doesn't work

    This took me two days to figure out, and I wonder if it is a bug:
    I have a page that can be navigated to on two occassions, let's call them "left" and "right". I want the page to know what side I came from, so I set a requestScope variable on the buttons that navigate to this page, a bit like this:
    <af:commandButton action="toPage">
      <af:setActionListener from="left" to="#{requestScope.sideFrom}"/>
    </af:commandButton>I have two buttons on the page, one is to navigate back to the left and one to navigate back to the right. Only one is rendered, depending on the requestScope.sideFrom variable.
    One says rendered="#{requestScope.sideFrom eq 'left'}" and the other says rendered="#{!requestScope.sideFrom eq 'left'}"
    Only one button works, namely the one for which the rendered property evaluates to true <b>when the button is pressed</b>!! My requestScoped variable doesn't exist anymore when I press the button to navigate back so it's behavior is changed. How weird is that?
    Should I file a bug?
    I refuse to make it a sessionScoped variable and change it back with the return buttons Imho this is what requestScope is for.
    I am on JDeveloper 11.1.1.6

    Wendy,
    To amplify what Timo rightly says: as JSF goes through its merry lifecycle, one of the steps is to rebuild the component tree in memory. When you use the rendered property, that particular component is not in the component tree - it's as if it doesn't even exist according to JSF. Then, when it comes time to deal with events, the event isn't seen or is ignored (I don't know which) because JSF doesn't think that component is present. As Timo also rightly says - this behaviour is why the "visible" attribute was created.
    John

  • Authorization Variable doesn't work in Workbook

    Hi all,
    I have defined authorization variable for a characteristics in Query. When I run the query, the variable's value can be derived from user's authorization. But when running in workbook, it doesn't work. The value is empty and workbook shows "No Authorization". Does anyone have the same problem?

    Dear Eric,
    Are you sure that you have enabled the authorization object for your InfoProvider? This is something that has to be done in transaction RSSM after an authorization object as been created.
    Greetings,
    Stefan

  • Why this statement doesn't work?

    I have two table job and job_status,I use Page Process try to insert records to job_status, but the select query doesn't work, it display all the job in job table didn't filtered out the job matching the query, do someone know why? Any suggestion will be appreciated!
    DECLARE
    BEGIN
    FOR x IN (
    SELECT
    JOB_SEQ,
    PRIMARY
    FROM JOB
    WHERE ((RUN_DATES like '%'||:P6_WDAY||'%')
    or (RUN_DATES like '%'||:P6_DD ||'%')
    or (RUN_DATES like ''|| 0 ||'')))
    LOOP
    INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
    (x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
    END LOOP;
    END;

    ops wrong typed
    try
    DECLARE
    BEGIN
    FOR x IN (
    SELECT
    JOB_SEQ,
    PRIMARY
    FROM JOB WHERE
    ((RUN_DATES like CHR(39)||'%'||:P6_WDAY||'%'||CHR(39))
    or (RUN_DATES like CHR(39)||'%'||:P6_DD ||'%'||CHR(39))
    or (RUN_DATES like ''|| 0 ||'')))
    LOOP
    INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
    (x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
    END LOOP;
    END;

  • Why this example doesn't work ?

    for example below:
    html code:
    <applet code=LunarPhasesRB.class width="200" height="200">
        </applet>when i run it on IE , i get below result:
    failed to loading java program.
    why it doesn't work on IE ?
    who can help me ?
    thanks !

    thanks a lot!
    left of web browser appear below info:
    small application program LunarPhasesRB notinited
    what does it mean ?
    if i click "Click to activate and use this control".
    another err:
    failed to loading java program.
    who can help me ?

  • Why FileUtils::CopyFile doesn't work with blank space?

    Hi all,
    If I have a destination directory with blank space inside, looks like: "C:\Users\Pattrick James\Documents" for Windows or "Macintosh HD:Users:Pattrick James:Documents" for Mac.
    Then I want to copy a file to that directory, use FileUtils::CopyFile(src, des). Why it doesn't work?
    Can someone please help me to resolve this issue without change my path?

    Sorry, it works fine. It happens because the permission of the directory.

  • Query variable doesn't work

    Help, I have a query with a variable that doesn't work, if I substitute a valid value for the variable it works correctly. What am I doing wrong here?
    SELECT     T1.FormatCode, T0.Account, MONTH(T0.TaxDate) AS Period,
                          CASE MONTH(TaxDate) WHEN 1 THEN SUM(Debit - Credit) END AS January,
                          CASE MONTH(TaxDate) WHEN 2 THEN SUM(Debit - Credit) END AS February,
                          CASE MONTH(TaxDate) WHEN 3 THEN SUM(Debit - Credit) END AS March,
                           CASE MONTH(TaxDate) WHEN 4 THEN SUM(Debit - Credit) END AS April,
                           CASE MONTH(TaxDate) WHEN 5 THEN SUM(Debit - Credit) END AS May,
                          CASE MONTH(TaxDate) WHEN 6 THEN SUM(Debit - Credit) END AS June,
                          CASE MONTH(TaxDate) WHEN 7 THEN SUM(Debit - Credit) END AS July,
                          CASE MONTH(TaxDate) WHEN 8 THEN SUM(Debit - Credit) END AS August,
                          CASE MONTH(TaxDate) WHEN 9 THEN SUM(Debit - Credit) END AS Sept,
                          CASE MONTH(TaxDate) WHEN 10 THEN SUM(Debit - Credit) END AS Oct,
                          CASE MONTH(TaxDate) WHEN 11 THEN SUM(Debit - Credit) END AS Nov,
                          CASE MONTH(TaxDate) WHEN 12 THEN SUM(Debit - Credit) END AS Dec
    FROM         JDT1 AS T0 INNER JOIN
                          OACT AS T1 ON T0.Account = T1.AcctCode
    WHERE     (T0.TaxDate > '12/31/2007') and T1.segment_1 = [%0]
    GROUP BY T1.FormatCode, T0.Account, MONTH(T0.TaxDate), YEAR(T0.TaxDate)
    ORDER BY T1.formatcode
    Segment_1 is the value I what to let the user enter.
    This query also groups by month, so there is a row for each month, each GL account. Is there a way I can collapse this to one line per account? And show each the GL amount of each month across?
    The purpose of this query is to give a report of each GL account with a column amount for each month.
    Thanks

    Peter,
    Using a fully qualified table reference helps.  I mean [dbo\].[xxxx\]
    Check this out
    SELECT T1.FormatCode, T0.Account, MONTH(T0.TaxDate) AS Period,
    CASE MONTH(TaxDate) WHEN 1 THEN SUM(Debit - Credit) END AS January,
    CASE MONTH(TaxDate) WHEN 2 THEN SUM(Debit - Credit) END AS February,
    CASE MONTH(TaxDate) WHEN 3 THEN SUM(Debit - Credit) END AS March,
    CASE MONTH(TaxDate) WHEN 4 THEN SUM(Debit - Credit) END AS April,
    CASE MONTH(TaxDate) WHEN 5 THEN SUM(Debit - Credit) END AS May,
    CASE MONTH(TaxDate) WHEN 6 THEN SUM(Debit - Credit) END AS June,
    CASE MONTH(TaxDate) WHEN 7 THEN SUM(Debit - Credit) END AS July,
    CASE MONTH(TaxDate) WHEN 8 THEN SUM(Debit - Credit) END AS August,
    CASE MONTH(TaxDate) WHEN 9 THEN SUM(Debit - Credit) END AS Sept,
    CASE MONTH(TaxDate) WHEN 10 THEN SUM(Debit - Credit) END AS Oct,
    CASE MONTH(TaxDate) WHEN 11 THEN SUM(Debit - Credit) END AS Nov,
    CASE MONTH(TaxDate) WHEN 12 THEN SUM(Debit - Credit) END AS Dec
    FROM [dbo\].[JDT1\] T0 INNER JOIN
    [dbo\].[OACT\] T1 ON T0.Account = T1.AcctCode
    WHERE (T0.TaxDate > '12/31/2007') AND T1.segment_1 = '[%0\]'
    GROUP BY T1.FormatCode, T0.Account, MONTH(T0.TaxDate), YEAR(T0.TaxDate)
    ORDER BY T1.formatcode

Maybe you are looking for