Discoverer desktop aborts when passing parameter

Hi All,
I'm trying to pass parameters to a discoverer desktop workbook, using the following command:
C:\oracle\product\BIToolsHome_1\bin\dis51usr.exe /connect discover/discover@fincon_d10 /opendb FCONR09615 /parameter p_user 'FCON' /parameter session_id '26240255' /parameter p_dt_final '31/01/2008'
where FCONR09615 is my workbook. But when I execute this command discoverer desktop aborts!
When I manually open the wokbook and fill the parameters, it works just fine.
Any Ideas?
Thanks in advance,
Valentim

Hi Valentim
You don't seem to be telling Discoverer which worksheet to open. You need to use the sheet command.
Let me look at the rest of your command.
1. You appear to be calling Discoverer Desktop correct
2. The command /connect is correct with username/password@database
3. The /opendb command is correct so long as you have a workbook called FCONR09615 owned by the user discover
4. You seem to have 2 parameters: one called p_user and one called p_dt_final. I can't comment as to whether you are passing the correct string values as I don't know how you have defined the objects that the parameters are feeding. I can tell you that your parameters need to be called p_user and p_dt_final
Best wishes
Michael

Similar Messages

  • "Missing parameter values " when passing parameter to subreport

    i have a subreport embedded in main report.
    sub report take a procedure with parameter.the main report does nothing but only holds many sub report.now i have to pass parameter from code to sub report.ive used the following code but it gives "missing parameter values" error
    Any help??
       ParameterField paramField = new ParameterField();
            ParameterFields paramFields = new ParameterFields();
            ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
            paramField.Name = "@LabNo";
            paramDiscreteValue.Value = "1034";
            paramFields.Add(paramField);
            ParameterValues paramvalues = new ParameterValues();
           paramvalues.Add(paramDiscreteValue);
            paramField.CurrentValues.Add(paramDiscreteValue);
    rptDocument.ParameterFields[0].CurrentValues = paramvalues;

    does the sub report have parameters in it as well?
    if the sp used for the sub report has parameters you need to pass them to the sub. i would probably remove the parameters from the sub and join the sub to the main by the parameter from the main to the field in the sub.

  • Help in CURSOR when pass parameter for the IN

    Hi,
    Need some help I have CURSOR that takes a VARCHAR2 and NUMBER but when I run my Procedure it gives invalid number. Here is the CURSOR
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (p_list)
                AND pidcol = p_id;
    plistcol is of datatype NUMBER
    In my procedure I am building a list to comma separated numbers that goes in p_list parameter of type VARCHAR2 to the cursor i.e.
    I have a for loop to build that list e.g.
    loop
    -- num is of datatype NUMBER
    p_list := p_list || num || ',';
    end loop
    IF (p_list IS NOT NULL)
    THEN
    p_list := SUBSTR (p_list, 1, LENGTH (p_list) - 1);
    END IF;here is how my p_list looks when i pass it on to the cursor
    *12,345,678*
    and here is how open the cursor
    OPEN get_count (p_list, 99999);
    and here is the error I get
    SQLERRM ORA-01722: invalid number
    Now when I hard *12,345,678* in my CURSOR SELECT it works fine, it's only when I pass this as parameter it fails. For example I hard code the values in my CURSOR select it works fine
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (12,345,678) -- even '12','345','678' works when hardcoded
                AND pidcol = p_id;I even tried passing the values in the format *'12','345','678'* but still get the above error. So how can I pass the values to cursor IN clause.
    So wondering what might be the issue.
    Thanks

    Why this kind of coding needs to be avoid - here is one demonstration of one aspect ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.22
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:01.90
    satyaki>
    --Your query works and here is the slightly modified version of your query
    satyaki>
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 8
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.09
    satyaki>
    --Now, modifying the input i can sniff into the entire data
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20) or (1=1';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 13
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.10
    satyaki>Got me?
    Regards.
    Satyaki De.

  • Get ORA-00932 inconsistent datatype when passing parameter in tableadapter

    I have to build a Dataset to use as source for Microsoft rdlc-Report.
    In the Dataset I create a tableadapter using plain SQL.
    In my SELECT-Command I have to pass a Date parameter:
    I've tested a SELECT like in the following example:
    SELECT a.field1, a.field2, field3
    FROM table a 
    WHERE a.createdate < :IN_DATE In the tableadapter query-builder I get data, but after storing the command I get following error-message:
    ORA-00932 inconsistent datatypes expected date got number
    Later I have to pass the Date parameter in a Function like
    SELECT a.field1, a.field2, getvalue(a.field3,:IN_DATE) FROM table aIm using ODP.NET 11g on a 10g Oracle DB server.
    Is there a possibility to pass a Date parameter?
    I hope anyone has a tipp...
    Roswitha

    Check the OracleParameter here: http://www.oracle.com/technology/pub/articles/mastering_dotnet_oracle/cook_masteringdotnet.html
    Ming Man

  • "Could not find a match" error when passing parameter prefixed with "std::"

    We're moving from Solaris 8 to Solaris 10, and I'm compiling our C/C++ applications using the Sun Studio 8 C++ compiler to verify that they'll still run correctly under Solaris 10.
    All is well except for an error I'm getting on my Solaris 10 system but not on my Solaris 8 system.
    Specifically, this line of code compiles correctly on both systems:
        if ( std::find_if(ident.begin(), ident.end(), is_not_alnum) != ident.end() )
            throw invalid_ident(caption, ident, code);but this line produces an error on Solaris 10 (but not on a Solaris 8 server):
        if ( std::find_if(ident.begin(), ident.end(), std::islower) != ident.end() )
            throw invalid_ident(caption, ident, code);The error returned is:
    "auth_validate.C", line 140: Error: Could not find a match for std::find_if<std::InputIterator,
    std::Predicate>(const char*, const char*, extern "C" int(int)).Clearly the "std::" prefix is involved... but why would this code compile successfully under Solaris 8 but fail under Solaris 10?
    I've eliminated the usual suspects: the compiler is the same (including the include files) on both servers; there are no differences in the makefiles; there are no differences in the source code; all the referenced include directories exist on the Solaris 10 server.
    At this point I'm stumped. My guess is that there's some environmental variable somewhere in Solaris 10 that is telling the Sun Studio 8 compiler to behave in a particular way (which Solaris 8 isn't telling the compiler), but I can't guess where such a thing might be occurring or what it might look like.
    I've tried changing the source code to simply delete the "std::" prefix, and that code then compiles correctly on both my Solaris 8 and Solaris 10 servers. However, I'd very much prefer not to have to change any source code -- if this is an environmental issue with Solaris 10 affecting how the Sun Studio 8 C++ compiler behaves, I'd like to know about that.
    If anyone can shed some light on this problem, or even propose additional tests I might try, I'd appreciate it!

    clamage45, thanks very much for the response.
    I'm looking into putting together a small example app. Meanwhile, I took your suggestion to check the patch levels of the two compiler instances and lo! there is a discrepancy.
    The compiler installed on our Solaris 8 server reports itself from a CC -V command as "CC: Sun C++ 5.5 Patch 113817-19 2006/10/13", while the version on the Solaris 10 server reports as "CC: Sun C++ 5.5 2003/03/12". So although my eyeball comparison of the compiler's include files and libraries (including file sizes and timestamps) showed no differences, that was just a spot check; it wasn't the more "official" check that you helpfully suggested.
    I've asked our sysadmin to look into this. No guarantees, of course, but I would not be surprised if patching the compiler on our Solaris 10 system resolved the problem. (Assuming we can find a version of the most recent patch for the Sun Studio 8 C++ compiler that's valid for Solaris 10.)
    Regarding Sun Studio 8, we're definitely aware that it's reached its expiration date. We already have plans to transition to a more up-to-date version (probably Sun Studio 12) at a later date -- all I'm doing currently is testing to verify that the current application compiles and runs properly on Solaris 10. If possible, I'd like to get that working independently of any potential code changes driven by a significant compiler version upgrade.
    Thanks again, and I'll add a new comment with additional information if our patching doesn't help.

  • Discoverer Desktop CLI /pt parameter

    Hi,
    Does any have setup Discoverer Desktop CLI using /pt parameter which sets the printer. I'm using this:
    dis51usr.exe /pt c:\Posting.DIS sysa.pr05 "FX DocuCentre-III 2007 PCL 6" 515 /connect discoverer/discoverer@disdb /parameter from '15-APR-2013' /parameter to '30-APR-2013'
    but i'm getting "Could not start print job" message. /p parameter that prints out to default printer is working fine.
    Do i have the wrong parameter input for /pt? Please help.
    TIA.

    Hi,
    i believe many people would not have used this feature . Please contact Oracle support through a service request . they will defnetly help you
    Thanks
    Naga

  • Discoverer Desktop prints empty sheet

    Hi,
    I am using Discoverer Desktop. When I execute a workbook, the data is displayed properly in Desktop. But when I print the sheet, an empty sheet is printed.
    Does anyone has any idea what the reason is for this behaviour?
    Bart

    check other thread with similar title

  • Discoverer Desktop Connections Fails With Invalid Username/Pass in r12

    Hi all;
    I have problem. I can login Discoverer Administrator from my localmachine and i can see what ppl did it there.. But when i try to login Discoverer Desktop from my localmachine its gives me Invalid Username/Pass. error.
    I even cant login my system from browser :
    http://xx.com:7778/discoverer/plus << pages comes and i fill in the blanks area like:
    Connect to : Oracle Application
    Username: sysadmin
    pass: ***
    Database: VIS
    I found some document from forums. Whihc is :
    Discoverer Is Unable to Connect to Oracle Applications database: invalid username/password      Doc ID: Note:467919.1
    Discoverer 10g (10.1.2) Connectons To Oracle E-Business Suite 12 Fails With 'Invalid Username/Password'      Doc ID: Note:443661.1
    But before i apply those patch i want to take advice from you. Coz i can login Discoverer Administrator and can use it but cant login Discoverer Desktop...its kind of wierd... i already checked what i have done in installtion and its all seems correct.
    Any idea;
    Regards
    Helios

    Discoverer supports two kinds of connections - database schema connections and apps connections. For Disco Admin, you login using a database schema, which, as you stated, works. For Disco User you login using an Apps user account (for which there is a no equivalent database scherma). To enable such a connection, you need to check the "oracle applications user" check box on the 10g Disco login screen. Also, under Tools --> Options, in the Connection tab, make sure that "connect to both standard and applications EULs" radio button is selected.
    HTH
    Srini

  • Passing parameter to a query in Discoverer Admiin custome folder.

    I am developing a report in which I need to paa in the request Id as parameter to display the user the data corresponding to that request Id. However the query is very complex and If I am enetering the request Id in Discoverer Desktop se as Condition for the workbook created the report takes a lot of time to generate. Is there any mechanism through which I can pass the parameter directly to the Custome folder query. As this will reduce my computation time since all the joins will be done only for the rows with that given request Id rather than for all the rows which is happenning correctly.
    Thanks.

    Hi,
    Well there is no straight forward way to do that.
    There is a work around to get that functionality by using outer tables or context.
    Take a look at the following posts:
    Re: Parameters in SubQuery
    Re: Parameters in Discoverer Administration
    Re: Passing multiple parameters into Custom Folder...

  • Parameter default value doesn't work in Discoverer Desktop 4i

    Hello,
    I have a parameter called 'Organization' in discoverer report.
    I want to set its default value to one organization from the list of values. I edited the parameter
    and selected that value from the list in the Default value field. But,when I run
    the report, it shows the recently used value for that parameter,
    instead of showing the default value.
    I have the same problem with all parametrs in workbooks in Discoverer.
    I am using Discoverer Desktop 4i (4.1.41.05.00).
    Is there anything i can do to make Discoverer show me the default value for the parameter every time i run the workbook?
    Thanks in advance!

    Thanks Rod!
    Unfortunately it seams that seting that p[reference doesn't work for my version of Discoverer.
    That option is introduced with version 4.1.43 and we are using version 4.1.41.05.
    I suppose i can't solve that problem on another way in this version of Discoverer Desktop..?
    Best regards!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ORA-02248 When I Try to Connect Discoverer Desktop 9.0.4.43.17 to 11.2.0.1

    Hi Fellows.
    I'm trying to Connect Discoverer Desktop 9.0.4.43.17 to Oracle Database 11.2.0.1. I Installed the program (Windows 7 Emulating XP SP3) But when I try to connect to Database send me ORA-02248 Error, some Alter Session. I'm Using a user with DBA privileges But I cannot Connect to Database, Do I have to Install an Additional Software or create a Special User or Schema????
    I would like to check and use Discoverer because I think that will be very usefull for the end users of the company.
    Thanks for your time.
    Best Regards
    Emmanuel.

    Dear Friend.
    I can connect via SQLPLUS with SYS as SYSDBA and everthing is ok But When I try to do it in Discoverer Logon Form I Can't and i get Error ORA-12154. Can I fix ORA-02248 ALTER SESSION problem Connected from SQLPLUS as SYS???? I was Checking But I cannot Find Nothing Regarding this issue. Its seem the aplicaction when connect Try to ALTER the Session But Fails and the Program Abort. I Also check for SQL Scripts into the Binary Discoverer Directory But Nothing.........I just found a lot of Jar Files.
    Thanks a Lot
    Emmanuel.

  • How to pass parameter when create view link

    Hi,
    I used R12 to implement OAF. I create a VO with paramenter such as SELECT item_code,parent_item_code,month_budget_id
    FROM cux_ce_month_budget_lines_t
    where month_budget_id=:1
    But when I create VL for this VO. It seems the parameter :1 can not be passed.
    Could some one to help lookinto this?
    Best Regards,
    Eileen

    You donot need to pass parameter while creating the View Link. Once the view link is created then you assign the bind parameter to the master VO and execute the View link. The Child VO would automatically be executed.

  • Sub Query Error When Passing Dynamic Parameter.

    Dear All, I need help for below query problem.
    I have try below query run no problem when pass a static Parameter into the query but it throw error once i have add in the dynamic parameter:-
    --Sales BatchNum Transaction
    SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T4.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity',
    (SELECT [Quantity] FROM [OIBT] T1 WHERE T1.[ItemCode] = T0.[ItemCode] AND T1.[WhsCode] = T0.[WhsCode] AND T1.[BatchNum]=T0.[BatchNum]) AS 'Stock OnHand'
    FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                      INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                      INNER JOIN [OITW] T4 ON T0.[ItemCode] = T4.[ItemCode] AND T0.[WhsCode] = T4.[WhsCode]
    WHERE T0.[BaseType] = [%0] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T3.[ItmsGrpNam] = [%3]
    GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], T4.[AvgPrice]
    --ORDER BY T0.[ItemCode]
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.[ItemCode], T4.[ItemName],T4.[WhsCode], T4.[BatchNum], ISNULL(T7.[AvgPrice],0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.[Quantity])
    FROM [OIBT] T4 INNER JOIN [OITM] T5 ON T4.[ItemCode] = T5.[ItemCode]
                      INNER JOIN [OITB] T6 ON T5.[ItmsGrpCod] = T6.[ItmsGrpCod]
                      INNER JOIN [OITW] T7 ON T4.[ItemCode] = T7.[ItemCode] AND T4.[WhsCode] = T7.[WhsCode]
    WHERE NOT EXISTS
    ( SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T5.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity'
      FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                        INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                         INNER JOIN [OITW] T5 ON T0.[ItemCode] = T5.[ItemCode] AND T0.[WhsCode] = T5.[WhsCode]
      WHERE T0.[BaseType] = [%1] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T4.[ItemCode]=T0.[ItemCode] AND T4.[WhsCode]=T0.[WhsCode] AND T4.[BatchNum]=t0.[BatchNum] AND T3.[ItmsGrpNam] = [%3]
      GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum],T5.[AvgPrice]
    AND T6.[ItmsGrpNam] = [%3]
    GROUP BY T4.[ItemCode], T4.[ItemName], T4.[WhsCode], T4.[BatchNum], T7.[AvgPrice]
    HAVING SUM(T4.[Quantity]) > 0
    ORDER BY 1, 2, 3, 5 DESC
    I think SAP Query Manager can support the sub-query, kindly advise how to solve or other alternative way to solve this issue.
    Thanks a lot.

    Dear  Thanga Raj K,
    From your solution i can get my expected result, only within your solution you miss out the @ in line 32 for ToDate variable.
    After i have added it, it working perfectly.
    Thanks once again.
    For other user References code(Corrected):-
    Declare @basetype as int
    Declare @FromDate as Datetime
    Declare @ToDate as Datetime
    Declare @ItemGroup as nvarchar(30)
    set @basetype = (select max(s0.BaseType) from IBT1 S0 where s0.BaseType = '[%0]')
    set @FromDate = (select min(S1.DocDate) from IBT1 S1 where S1.DocDate >= '[%1]')
    set @ToDate = (select max(S2.DocDate) from IBT1 S2 where S2.DocDate <= '[%2]')
    set @ItemGroup = (select max(S3.ItmsGrpNam) from OITB s3 where S3.ItmsGrpNam = '[%3]')
    --Sales BatchNum Transaction
    SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T4.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity',
    (SELECT Quantity FROM OIBT T1 WHERE T1.ItemCode = T0.ItemCode AND T1.WhsCode = T0.WhsCode AND T1.BatchNum=T0.BatchNum) AS 'Stock OnHand'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T4 ON T0.ItemCode = T4.ItemCode AND T0.WhsCode = T4.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, T4.AvgPrice
    --ORDER BY T0.ItemCode
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.ItemCode, T4.ItemName,T4.WhsCode, T4.BatchNum, ISNULL(T7.AvgPrice,0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.Quantity)
    FROM OIBT T4 INNER JOIN OITM T5 ON T4.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OITW T7 ON T4.ItemCode = T7.ItemCode AND T4.WhsCode = T7.WhsCode
    WHERE NOT EXISTS
    (SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T5.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T5 ON T0.ItemCode = T5.ItemCode AND T0.WhsCode = T5.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T4.ItemCode=T0.ItemCode AND T4.WhsCode=T0.WhsCode AND T4.BatchNum=t0.BatchNum AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum,T5.AvgPrice
    AND T6.ItmsGrpNam = @ItemGroup
    GROUP BY T4.ItemCode, T4.ItemName, T4.WhsCode, T4.BatchNum, T7.AvgPrice
    HAVING SUM(T4.Quantity) > 0
    ORDER BY 1, 2, 3, 5 DESC

  • How to skip the spaces, ' etc when passing the parameter to srw.run_report?

    Hi, I have got problem with passing parameter to srw.run_report. It seems it doesn't take the special symbols such as space, ', etc.. the statement is like:
    srw.run_report('report=test1 p_name='&#0124; &#0124;:p_title);
    if :p_title is "JOE", there is no problem to pass it, but if the :p_title is "JOE LI", then the value of the parameter can be passed to p_name.
    Does any one know how to skip those special symbols in the string when passing it to srw.run_report. Thank you very much.
    Joe

    Hi,
    Try this :
    srw.run_report('report=test1 p_name='&#0124; &#0124;
    chr(34)&#0124; &#0124;:p_title&#0124; &#0124;chr(34)
    );

  • Parameter type conflict from Toplink 11g when passing ArrayList as input

    When passing ArrayList as an input to a StoredProcedureCall, I am getting the following stacktrace:
    t] Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080121)): oracle.toplink.exceptions.DatabaseException
    [junit] Internal Exception: java.sql.SQLException: Parameter Type Conflict
    [junit] Error Code: 17012
    [junit] Call: BEGIN XL_SP_ASSIGN_EVENTLIST(?, usrName=>?, assignUsrkey=>?, assignGrpkey=>?); END;
    [junit] bind => [null => eventIdList, FOO1, 117, 0]
    [junit] Query: ValueReadQuery()
    [junit] at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:295)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:724)
    [junit] at oracle.toplink.internal.databaseaccess.DatabasePlatform.executeStoredProcedure(DatabasePlatform.java:1627)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:534)
    [junit] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
    Here is my code snippet to pass ArrayList as input parameter :
    StoredProcedureCall spc = new StoredProcedureCall();
    spc.setProcedureName(procedureName);
    spc.addUnamedInOutputArgument("eventIdList", "eventIdList", Types.ARRAY,
    "EVENTIDS", ArrayList.class);
    String argLoggedInUsrName = "usrName";
    String argAssignedUsrKey = "assignUsrkey";
    String argAssignedGrpKey = "assignGrpkey";
    spc.addNamedArgument(argLoggedInUsrName);
    spc.addNamedArgument(argAssignedUsrKey);
    spc.addNamedArgument(argAssignedGrpKey);
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(spc);
    query.addArgument("eventIdList");
    query.addArgument(argLoggedInUsrName);
    query.addArgument(argAssignedUsrKey);
    query.addArgument(argAssignedGrpKey);
    Vector args = new Vector();
    ArrayList eventIdList = new ArrayList();
    eventIdList.add(new Long(50000));
    args.add(eventIdList);
    args.add(loggedInUsrName);
    args.add(assignedUsrKey);
    args.add(assignedGrpKey);
    eventIdList = (ArrayList) session.executeQuery(query, args);
    This code chunk was working with an earlier build. Would really appreciate any inputs on the error seen.
    Please note - the EVENTIDs type in the pl/sql procedure is defined as a VARRAY(100) of NUMBER

    Well I posted a thread several weeks ago...see this thread below
    trying to get used to sql*plus, running and creating a simple procedure
    and someone made comments about the select query leading to sql injection. Now I am trying to understand the true case behind that. I have an idea made it is because of the first concatenation in the parameter or not. Not sure.

Maybe you are looking for

  • Can't  view Impact and Lineage tab in Meta data report

    Post Author: mohideen_km CA Forum: Data Integration Hi guys, I have a problem in meta Data Report .. IN Impact and Lineage Analysis I can View only OVerview Tab.I can not view Impact and Lineage Help me to figure out.. Mohideen

  • BW Mass activity BWOP   / transaction FPOP

    Hi Experts, Please suggest how can i schedule FPOP  on periodic basis (Daily/Weekly/Monthly). with mass activity BWOP. We are using extractor Business Partner Items data using tcode FPOP out of ECC to BW . We want to automate this extraction using ma

  • Which is better, The iPhone 4 or iPhone 3GS?

    Hello people. I hope to be getting an iPhone today. I'm just trying to decide which one I will get. The 4 or 3GS? What are your opinions on both models? For some reason, I'd like to get the iPhone 4 because it's the latest model and the 3GS is almost

  • SMB Server using Oracle Text  Index

    Hi folks, I am looking into IFS and can't find any info on whether IFS is able to use the Oracle Text indexing, when accessed through SMB (directory mount). If I search for a file containing a given string is that search executed within IFS and only

  • HT4890 where are my photos on iCloud?

    I've been backing up photos from my iphone 4 to iCloud (previously Moblle Me) and now I can't find them. Where are they? Thanks