SQL query returns value but EXEC SQL Task fails to assign variable

I have an execute SQL task to get an identifier from an Oracle database and assign it to a variable (the variable is used in subsequent query's where clauses to transfer the data to a SQL Server database). If I copy the query from the SSIS
package to the Oracle SQL Developer interface and run the query; I get the expected single identifier. If I run the execute SQL task I get the error "[Execute SQL Task] Error: An error occurred while assigning a value to variable "VariableName":
"Single Row result set is specified, but no rows were returned."
I can create phony/simpler versions of the query that will return the wrong identifier that will successfully assign the value to the variable, so the problem isn't with the variable itself or the way the result set is set up in the task (Result
Set/Single Row in the General panel; Result Name 0/VariableName in the Result Set panel).
How can two queries that return a single value produce different results with respect to the variable assignment process?

Perhaps you can trap (profile) the query in Oracle to see what it gets submitted,
thing is this query
select id from table where ProcessedStatusColumn is null and DateColumn = (sub select to get most recent date in table where ProcessedStatusColumn is null)
is not guaranteed to return a value, you need a default returned in case the search failed e.g.
select
NVL(id, 0)
from table where ProcessedStatusColumn is null and DateColumn =
(sub select to get most recent date in table where
ProcessedStatusColumn is null)
Arthur My Blog

Similar Messages

  • Sys_refcursor not fetching any data although query returns value

    hi!!!
    I am using sys_refcursor to return columns,and using below procedure to do so.Although data is there in table_1 and table_2.
    PROCEDURE test_pro(abc_date N DATE,
    cur_get_data OUT sys_refcursor
    OPEN cur_get_data
    for
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    IF cur_get_data%rowcount=0
    then
         raise e_error;
    END if;
    EXCEPTION
         when e_error
         then
              ------no_data_found;
         when others
         then
    --------(giving SQL error with error code);
    END      test_pro;
    while running below sql in sql window of pl/sql developer fetching
    data
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    so can somebody please put some ideas what cud be the possible reason for this??

    Welcome to the forum!
    Unfortunatley you posted to the wrong forum. This question belongs in the SQL and PL/SQL forum.
    PL/SQL
    >
    sys_refcursor not fetching any data although query returns value
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    >
    A cursor doesn't fetch data - your code has to do that. The code you posted doesn't have any FETCH statements so no data will be fetched.
    There is no problem using 'IF cur_get_data%rowcount=0' but it will always be 0 in your code because you are not fetching any data.
    I'm guessing that you are trying to determine if there are any rows for the query. That isn't going to work since a cursor doesn't fetch rows.
    You just have to return the cursor to the caller and the caller will have to perform at least one fetch to see if there are any rows.
    If the above answers your question the just mark the question ANSWERED. Otherwise, since you have posted in the wrong forum
    1. repost the question in the SQL and PL/SQL forum
    2. Edit this post to add a link to the new thread in the other forum
    3. Mark this question ANSWERED so people will follow up in the other forum.
    Thanks.

  • Execute SQL Task Failing

    Hi there,
    I have this issue with my Execute SQL Task Failing. I am trying to execute a sp using an execute sql task. The execute statement is contained in a variable (exec [sp_name] par1, par2)  that I have declared at the package level. Now inside the exec sql
    tak, I am calling this variable. Now when I try to execute this task, it fails and I get the following:
    [Execute SQL Task] Error: Executing the query "EXEC CTL_ISRT_A 55,1" failed with the following error: "Could not find stored procedure 'CTL_ISRT_A'.". Possible failure reasons: Problems with the query, "ResultSet" property not
    set correctly, parameters not set correctly, or connection not established correctly.
    There is a stored procedure called "CTL_ISRT_A" in the db and I am able to execute it from SQL Server. This sp is inserting a new row in the table and it returns @@IDENTITY. 
    I tried setting the result set to a 'Single Row' and tried assigning the value to a variable but it didnt help. Could someone help me here?
    Thanks in advance

    return it as an output parameter 
    ie make sp like below
    ALTER PROCEDURE [devdba].[M_CTL_ISRT]
    @F_ID INT
    , @PR_IND BIT
    , @Debug bit = 0
    , @IDVal int = 0 OUTPUT
    AS
    BEGIN
    SET NOCOUNT ON
    DECLARE @ErrorMsg varchar(5000)
    DECLARE @USR_ID AS INT = 1;
    INSERT INTO TBL_D (F_ID, PR_IND, USR_ID,CRE_DT, LAST_MODD_USR_ID, LAST_MODD_DT)
    VALUES (@F_ID, @PR_IND, @USR_ID, GETDATE(), @USR_ID, GETDATE())
    SELECT @IDVal= @@IDENTITY
    END
    Then in execute sql task call it as 
    EXEC devdba].[M_CTL_ISRT] ?,?,0,? OUT
    then in parameter tab pass required variables and for last parameter make direction as Output and you'll get identify value stored in it.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Data Services Designer - Function returns value, but doesnt always populate

    Within my Query Transform I call a function that I pass a old Vendor code to a sql statement and it does a few lookups and cross references it returns a new value. My issue is sometime it doesnt put the value in the field. I know it has returned a value as I had the funtion print it out for me, so I can see the value that was passed and the returning value, but when I look in my table there is no value.
    I have added the function call for you to see it is very simple takes one parameter, I have also added the print out from my function, does anyone have any ideas??
    (This is under the field Vendor Code)
    P2CMM05_Look_UP_Vendor_Code(Query.LIFNR)
    6088     4800     PRINTFN     6/28/2011 9:27:48 AM     @@@@@@@@@@@ Ret_Vendor_code @@@@@@@@@@@   MCI_719
    6088     4800     PRINTFN     6/28/2011 9:27:48 AM     @@@@@@@@@@@ $Vendor_code @@@@@@@@@@@    MUR_51

    Within my Query Transform I call a function that I pass a old Vendor code to a sql statement and it does a few lookups and cross references it returns a new value. My issue is sometime it doesnt put the value in the field. I know it has returned a value as I had the funtion print it out for me, so I can see the value that was passed and the returning value, but when I look in my table there is no value.
    I have added the function call for you to see it is very simple takes one parameter, I have also added the print out from my function, does anyone have any ideas??
    (This is under the field Vendor Code)
    P2CMM05_Look_UP_Vendor_Code(Query.LIFNR)
    6088     4800     PRINTFN     6/28/2011 9:27:48 AM     @@@@@@@@@@@ $Vendor_code @@@@@@@@@@@    MUR_51
    6088     4800     PRINTFN     6/28/2011 9:27:48 AM     @@@@@@@@@@@ Ret_Vendor_code @@@@@@@@@@@   MCI_719

  • SQL Query returns values like "---" and "NA"

    Hi
              When I execute a sql query in MII it returns values like "---" and "NA" for empty Char and numeric fields respectively.
    I have checked the database and made sure that these fields does not have any value. This happens only when I run the query through MII. Can any one know how can we get rid of these values?
    Thanks in advance
    Shaji

    Shaji,
    MII sets those values as a default if it discovers null values in a query result. You can change this default behaviour in several ways.
    First, have a look at the document [Setting custom null values in XML|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70628af0-8ec4-2c10-7da2-f451e412dd8f?quicklink=index&overridelayout=true]. Then you may also use SQL functions like [NVL|http://www.techonthenet.com/oracle/functions/nvl.php] to change the value directly in the SQL query. You can also change the value inside the MII BLT to whatever you need.
    Michael

  • Execute SQL Task fails when specific column names are mentioned in Excel Query

    Hi,
    I have a requirement for extracting Excel data with thespecific column order. So instead of using the below query,
    Select * From [Sheet1$A1:ZZ1]
    I use the below one,
    Select col1,
    col2,
    col91
    From [CRM$A1:ZZ1]
    So I have totally 91 columns.
    I don't face any issues when i use the before query. i.e. direct select * from sheet1
    But when i specify column names and do a select from the sheet it throws error as below,
    [Execute SQL Task] Error: Executing the query "Select
    [Col1] 
    From [Sheet1$..." failed with the following error: "No value given for one or more required parameters.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not
    set correctly, or connection not established correctly.
    I just need to retrieve the column name alone and not any of the values to it. So when i do simple select * it gives the column names in the order of what it is been with the excel. But i do want it to be sorted in alphabetically and to retrieve the column
    names. 
    I am not getting any proper solution for this for past 1 and a half days. May anyone of you please help me get it sorted? - Thank you!
    --------------------------- Radhai Krish | Golden Age is no more far | --------------------------

    Please use something like below:
    SELECT F1 AS Col1, F2 AS Col2, F3 AS Col3, ...
    FROM [Sheet1$A1:ZZ1]
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • SQL task fails calling procedure but only change was adding an insert

    Have a SQL task that calls a procedure.  Works fine until I added a block of code that does an insert.  Then I get an error such as this
    ssis procedure Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
    What the heck?  The parameters havent changed and it works fine when called directly in SSMS.  Its not a permissions issue either, checked that already.
    The statement I added is doing an INSERT INTO SELECT FROM
    Works fine in SSMS.  Is this another one of those issues where there are too many select statements and SSIS is getting confused?  

    Disregard.  I should have paid closer attention to the execution results in the package, as there were actually 2 errors.  It was the first error that was the culprit.  Once I fixed that the other error went away.

  • SSIS custom execute sql task : Failed with error

    I am developing a custom SSIS task for running sql task. But it fails with error - I'm trying to set the resultsetbinding to be used by next task in workflow.
    Error: 0xC0014054 at CustomSSISTask: Failed to lock variable "User::id" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container
    during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
    Error: 0xC002F210 at CustomSSISTask, Execute SQL Task: Executing the query "SELECT id FROM sysobjects WHERE name = 'sysrowsets..." failed with the following error: "Failed to lock variable "User::id" for read access with error 0xC0010001
    "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is
    not being created.".
    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Warning: 0x80019002 at CustomSSISTask: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
    the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    Task failed: CustomSSISTask
    Here is the code sample I'm trying , 
            public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser,
                                                  IDTSComponentEvents componentEvents, IDTSLogging log, object transaction)
                MessageBox.Show("testing:");
                try
                    // Add the SQL Task
                    Package package = new Package();
                    package.Executables.Add("STOCK:SQLTask");
                    Microsoft.SqlServer.Dts.Runtime.Variable variable = package.Variables.Add("id", false, "User", 0);
                     // Get the task host wrapper
                    TaskHost taskHost = package.Executables[0] as TaskHost;
                    // Get the task object
                    ExecuteSQLTask task = taskHost.InnerObject as ExecuteSQLTask;
                    // Set core properties
                    task.Connection = connections[0].Name;
                    task.SqlStatementSource = "SELECT id FROM sysobjects WHERE name = 'sysrowsets'";
                    //task.SqlStatementSource =
                    //    "SELECT PersonID from [AmalgaSpeedTableData].[SpeedTable].[DimPerson] where PersonIntID  = '1'";
                    task.SqlStatementSourceType = SqlStatementSourceType.DirectInput;
                    // Add result set binding, map the id column to variable
                    IDTSResultBinding resultBinding = task.ResultSetBindings.Add();
                    //IDTSResultBinding resultBinding = task.ResultSetBindings.GetBinding(0);
                    resultBinding.ResultName = "variable";
                    resultBinding.DtsVariableName = variable.QualifiedName; //"User::id";
                    task.Execute(connections, variableDispenser, componentEvents, log, transaction);
                catch (Exception ex)
                    throw new ArgumentException(ex.Message);
                return DTSExecResult.Success;
    It doesnt throw any exception but custom task fails.
    Later I will be also using parametersetbindings to pass some input parameters to this task , since I'm stuck for out param - blocked moving ahead.
    Any help would be greatly appreciated.
    Thanks
    Sang

    Hi, could you check whether the following threads help:
    http://stackoverflow.com/questions/5787621/ssis-package-failed-to-locak-variable-for-read-access-with-error-0xc0010001
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/40ee7eff-5ec1-426f-a1a8-ab85b40b51aa/error-variable-can-not-be-found-while-executing-package-from-the-net-code?forum=sqlintegrationservices
    Regards, Leo

  • Execute SQL Tasks Failing for Duplicate Syntax Between DEV and Production DB

    Newbie here...be patient with me!
    I added tasks to refresh two tables (delete from, insert into, update) to an SSIS project . I have them running from the WinXP scheduler. The issue:
    In dev the tasks integrate and execute successfully from scheduler
    In prod I can right click and execute each of the three tasks without any problem, but the same tasks cause my project to fail when executed from scheduler
    Questions:
    Any ideas about what I am failing to see?
    How do I get a meaningful log messages from the tasks that are failing?
    Thanks for your ideas...
    Installed Edition: IDE Standard
    SQL Server Analysis Services  
    Microsoft SQL Server Analysis Services Designer
    Version 9.00.1399.00
    SQL Server Integration Services  
    Microsoft SQL Server Integration Services Designer
    Version 9.00.1399.00
    SQL Server Reporting Services  
    Microsoft SQL Server Reporting Services Designers
    Version 9.00.1399.00
    Microsoft Visual Studio 2005
    Version 8.0.50727.42  (RTM.050727-4200)
    Microsoft .NET Framework
    Version 2.0.50727
    Installed Edition: IDE Standard
    SQL Server Analysis Services  
    Microsoft SQL Server Analysis Services Designer
    Version 9.00.1399.00
    SQL Server Integration Services  
    Microsoft SQL Server Integration Services Designer
    Version 9.00.1399.00
    SQL Server Reporting Services  
    Microsoft SQL Server Reporting Services Designers
    Version 9.00.1399.00

    Newbie here...be patient with me!
    I added tasks to refresh two tables (delete from, insert into, update) to an SSIS project . I have them running from the WinXP scheduler. The issue:
    In dev the tasks integrate and execute successfully from scheduler
    In prod I can right click and execute each of the three tasks without any problem, but the same tasks cause my project to fail when executed from scheduler
    Questions:
    Any ideas about what I am failing to see?
    How do I get a meaningful log messages from the tasks that are failing?
    If i understand correctly you are trying to run SSIS package from Window XP task scheduler.  The reason for the failure may be due to permission while accessing resources required in the package. However it is difficult to suggest without
    looking at the error message.
    Scheduled tasks maintains a log file (Schedlgu.txt), in the c:\Windows folder. You can view the log from the Scheduled Tasks window by clicking
    View Log on the Advanced menu.
    The log file size is 32 kilobytes (KB), and when the file reaches its maximum size, it automatically starts to record new information at the beginning of the log file and writes over the old log file information.
    Refer http://support.microsoft.com/kb/308558
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa383604(v=vs.85).aspx
    Regards, RSingh

  • SQL task fails if previous task fails

    I have a Script task that I fail in the code explicitly based on a variable value.  When the script task fails, I set a constraint (failure) to execute the following SQL task
    However, I was thinking the SQL task would execute successful, especially since it does if I execute it by itself.
    In the package results, I see a failure message like this
    [Connection manager "ABC222"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x8004D00E. 

    Ok yes, thats what it was.  My issue was related to transaction settings.  The package was marked as "transactionOption = Required", so regardless if my sql task that sends mail is outside of the container or not, it was going to be part of the
    transaction, so when the transaction got rolled back, the sql statement will fail because it appears that the connection was abandoned?
    So the resolution was then to change the package transaction property to "Supported", then my SQL task worked as expected.  Oh, and I set the transaction option on the sql task itself to "not supported".

  • Query with subquery should return value but doesn't

    When I run this SQL, it returns no value:
    SELECT vfn.cat
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL'
    AND vfn.date_issued = (SELECT MAX(date_issued)
    FROM vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010);
    In order to test, I take out the subquery and run it separately:
    SELECT MAX(date_issued)
    FROM vps_fishery_ner
    WHERE vp_num = 211652
    AND ap_year = 2010;
    Returns 02-APR-10
    Then I paste this date into the original query (using the TRUNC function, of course, since I hardcode only the DDMMYY part of the date):
    SELECT vfn.cat
    FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
    AND vfn.cat = vf.cat
    AND vf.permit_year = 2010
    AND vf.moratorium_fishery = 'T'
    AND vfn.vp_num = 211652
    AND vfn.ap_year = 2010
    AND vfn.plan = 'MUL'
    AND TRUNC(date_issued) = TO_DATE('02-APR-10');
    And this returns the required value, 'A'.
    So why doesn't the full query with subquery work, if the value that is returned by the subquery is valid and works when you just paste it in?
    Thanks.

    Hi,
    Not sure about your question.
    But you say when you uss 01-apr-10 you get the expected results.
    So why dont you try using trunc on botht sides
    SELECT vfn.cat
      FROM vps_fishery_ner vfn, valid_fishery vf
    WHERE vfn.plan = vf.plan
       AND vfn.cat = vf.cat
       AND vf.permit_year = 2010
       AND vf.moratorium_fishery = 'T'
       AND vfn.vp_num = 211652
       AND vfn.ap_year = 2010
       AND vfn.plan = 'MUL'
       AND trunc(vfn.date_issued) = (SELECT MAX(trunc(date_issued))
                                FROM vps_fishery_ner
                               WHERE vp_num = 211652
                                 AND ap_year = 2010);Rememeber if you are couting on some Index to be used you might want to recheck.
    IN answer to your question why it does not return with subquery included, because the TIME PART is not the same.
    You yourself proved it by using the supplying only the date part.
    Regards,
    Bhushan

  • Pro C - Select abc into :cds returns value but strcpy(cds, 'test' did not

    Dear All
    I have a test.pc program at Unix as follow:
    varchar cds [11];
    varchar xyz [30];
    varchar fxo [11]
    main(argc, argv)
    int argc;
    char **argv;
    find_sp_inv ();
    ins_inv();
    find_sp_inv()
    EXEC SQL SELECT inv_no into :cds
    FROM sup_inv
    WHERE REF_NO = 12 ;
    cds.arr[cds.len] = '\0';
    EXEC SQL DECLARE cinvno CURSOR for select inv_type from inv_types
    where ref_no = 12;
    EXEC SQL OPEN cinvno;
    for (i=0;i<3;i++) /* max three inv_type needed only against one reference */
    /* invoice types may be one, two or three against one ref_no so need loop */
    EXEC SQL WHENEVER NOT FOUND GOTO notfoundd;
    EXEC SQL FETCH cinvno into :fxo;
    fxo.arr[fxo.len] = '\0';
    strcat((char*)xyz.arr,(char*)fxo.arr);
    notfoundd:
    printf("%-30sn\", xyz.arr) /* prints the value .. printing fine */
    return;
    ins_inv()
    EXEC SQL
    INSERT INTO inv_reference (ref_NO, ref_types)
    SELECT :cds, :xyz from dual;
    return;
    } /* end my program */
    **So it only picks Value of :cds an did not :xyz value? why please explain me ( i mean help me out).**
    **Kind regards.**
    **Saeed**

    Perhaps you have posted your problem in a wrong place - i guess.
    Check from here ->
    http://forums.oracle.com/forums/category.jspa?categoryID=18
    Or,
    http://forums.oracle.com/forums/main.jspa?categoryID=84
    And, please close this thread by marked it as answered.
    Regards.
    Satyaki De.

  • Result attribute's recordcount and identitycol returning values but row not inserted

    This works in developement and test but does not work on live system-problem is only there.
    When trying to insert a record, the result attribute of cfquery returns a 1 and the identitycol attribute seems to increment right but no record is inserted.
    Any help would be really appreciated.

    The problem's over, someone else's program was deleting them.
    Since I started using result.recordcount, I'm not checking anymore. Before using it, I had a query look for the newly inserted record.
    Should I put that back in?

  • Query return value

    hi everybody
    i join new project and here some query use in reports like this, bt i m confuse abt
    ths query. that exact wht meaning of this query
    plz help me
    SELECT SUM(QTY),
    SUM(val)
    FROM (
    SELECT
    SUM(NVL(m.item_qty,0)) qty,
    SUM(NVL(m.item_qty,0) * rate) VAL
    FROM inv_m m
    WHERE m.div_code = 'IND01'
    AND m.inv_date BETWEEN TO_DATE('1-JAN-2006') AND TO_DATE('29-JUL-2006'))

    It would give another result in the presence of NULLs with AVG aggregate for example.
    DROP TABLE T1;
    CREATE TABLE T1 AS
         SELECT
                    DECODE(MOD(ROWNUM, 2), 0, OBJECT_ID, TO_NUMBER(NULL)) C1
                   ,DECODE(MOD(ROWNUM, 2), 0, OBJECT_NAME, NULL) C2
              FROM USER_OBJECTS
              WHERE ROWNUM <= 10
    SELECT * FROM T1;
        C1 C2
    171692 ATT_EMP_LEAVES
    28972 COUNTRIES
    28977 DEPARTMENTS
    28978 DEPT_ID_PK
    28982 EMPLOYEES
    10 rows selected.
    COLUMN Count FOR 999
    COLUMN SumC1 FOR 9999999
    COLUMN MinC1 FOR 9999999
    COLUMN MaxC1 FOR 9999999
    COLUMN AvgC1 FOR 9999999.999
    COLUMN StddevC1 FOR 9999999.999
    COLUMN MinC2 FOR A15
    COLUMN MaxC2 FOR A15
    SELECT
               COUNT(*) Count
              ,SUM(C1)     SumC1
              ,MIN(C1)     MinC1     
              ,MAX(C1)     MaxC1
              ,AVG(C1)     AvgC1
              ,STDDEV(C1)     StddevC1
              ,MIN(C2)     MinC2
              ,MAX(C2)     MaxC2
         FROM T1;
    COUNT    SUMC1    MINC1    MAXC1        AVGC1     STDDEVC1 MINC2           MAXC2
       10   287601    28972   171692    57520.200    63823.977 ATT_EMP_LEAVES  EMPLOYEES
    SELECT
               COUNT(*) Count
              ,SUM(C1)     SumC1
              ,MIN(C1)     MinC1     
              ,MAX(C1)     MaxC1
              ,AVG(C1)     AvgC1
              ,STDDEV(C1)     StddevC1
              ,MIN(C2)     MinC2
              ,MAX(C2)     MaxC2
         FROM T1
         WHERE C1 IS NOT NULL
    COUNT    SUMC1    MINC1    MAXC1        AVGC1     STDDEVC1 MINC2           MAXC2
        5   287601    28972   171692    57520.200    63823.977 ATT_EMP_LEAVES  EMPLOYEES
    (SELECT
               SUM(C1)
              ,MIN(C1)
              ,MAX(C1)
              ,AVG(C1)
              ,STDDEV(C1)
              ,MIN(C2)
              ,MAX(C2)
         FROM T1
         WHERE C1 IS NOT NULL
    MINUS
    SELECT
               SUM(C1)
              ,MIN(C1)
              ,MAX(C1)
              ,AVG(C1)
              ,STDDEV(C1)
              ,MIN(C2)
              ,MAX(C2)
         FROM T1
    UNION ALL
    (SELECT
               SUM(C1)
              ,MIN(C1)
              ,MAX(C1)
              ,AVG(C1)
              ,STDDEV(C1)
              ,MIN(C2)
              ,MAX(C2)
         FROM T1
    MINUS
    SELECT
               SUM(C1)
              ,MIN(C1)
              ,MAX(C1)
              ,AVG(C1)
              ,STDDEV(C1)
              ,MIN(C2)
              ,MAX(C2)
         FROM T1
         WHERE C1 IS NOT NULL
    no rows selectedCheers:o)

  • PL/SQL Function call error while reading or assigning returned value

    Hi,
    I am getting the following error while tryih to read the value of the PL/SQL Function. I am calling a function in one of my PL/SQL Packages passing mutliple IN parametes and the function returns some value back. Now on BPEL side when I try to read the return value I am getting an error:
    *<summary>*
    empty variable/expression result.
    xpath variable/expression expression "/ns3:OutputParameters/ns3:TEST_FUNCTION" is empty at line 124, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns3:OutputParameters/ns3:TEST_FUNCTION" is not empty.
    *</summary>*
    Even though in the console when I check the Invoke Output Parameter it does shows me a valid value being retuned by a Function but when I am trying to Assgn this value to some variable using Assign Activity I get the above error.
    Even though all goes fine but looks like I am not able to read or assign the value returned from the Function.
    So just wondering if this even works as to me I have a very simple example and that seems not to work. Function is called successfully and is returning the value as I can see it in the BPEL console but when tryin to read or assign that value to some other variable I get the above error.
    Any ideas?
    Thanks

    This issue has come up a lot. The problem is with a mismatch between the version of JDeveloper and SOA. You'll encounter namespace issues if you use 10.1.3.1 in combination with 10.1.3.3 (or 10.1.3.4). You MUST synchronize both JDev and SOA to 10.1.3.3 or 10.1.3.4 (mixing 10.1.3.3 and 10.1.3.4 is OK). We changed when going to 10.1.3.3 by adding elementFormDefault="qualified" to the generated XSD. We used the default "unqualified" in 10.1.3.1. So you'll encounter namespace issues unless you're using 10.1.3.3 or higher JDev AND SOA. The fact that I see &lt;*db:*...&gt; tells me that you're using 10.1.3.1 JDeveloper. The correct solution is to upgrade your components.

Maybe you are looking for

  • Calling report from form

    I have worked with oracle forms and reports 6i in client server. But from 9i it is web based. I have installed developer studio now I am unable to call the report. Using Run_report_product. How do I pass the report server name if it is local. I didnn

  • Forms Flickering in Forms 9i

    Forms Flicker Forms 9.0.2.11.0 Our application currently runs forms 6i using Jinitiator. We are in the process of upgrading our environment to 9i, database and forms. Because of the problems with downloading jinitiator to our user base we are looking

  • Auto populating the Date/Time Field in a Column

    I'm having an issue with the a Date and Time Column type auto populating the current date and time correctly.  I've put the =Now() function in the calculated value box.  I get the correct date and I get a time but the time is wrong,  its on Pacific T

  • Pages disappeared

    Today, I tried opening a document. But, it failed to open. A message popped up saying.. "The document could not be opened. The file is not in the right format." It also cannot be found in my applications. But, numbers and key note is showing on appli

  • Help me! can not ping through hostname

    Hello i am using Solaris 8. I can ping and reach the other host by IP only, I can not reach the other host by the DNS name. How can i overcome this problem. shall i do any configuration .Help me to resolve the problem. Thanks in advance, balachandar.