PL/SQl Libary not working

10-11  Source: Network gathering  Views:0 

I am trying to create a report that uses an Attached Library which contains a dynamic SQL statement.
1. The formula that calls the library is as follows:
Return Calculation('Sales.MTH_Sales', :Month);
2. The Library looks as follows:
Function Calculation (Field in Char, Month in Char_ Return Number is
Value Number;
Select Sum(Field)
Into Value
From Sales
Where Sales.Month=Month
Group By Store;
Return Value;
I get an error of "invalid number" when I run the report. The Field needs to be dynamic meaning it can be any field such as Sales.MTH_Cost and etc. I think the passing of the Field string is the one causing the problem. Any idea how I can solve this?
Thank you in advance,
I am replying to this problem because I did not receive any response to the problem. Will appreciate if there's someone out there who can help me, thank you in advance.
Related articles
  • PL/SQl Libary not working 10-11

    Hi, I am trying to create a report that uses an Attached Library which contains a dynamic SQL statement. 1. The formula that calls the library is as follows: Return Calculation('Sales.MTH_Sales', :Month); 2. The Library looks as follows: Function Cal

  • What will you do if any SQL is not oracle 10g...apps 10-11

    What will you do if any SQL is not working. in oracle 10g....apps wrote: yes sir.If you help me in answering my questions i wll be very thankful to you sir. tnx,I haven't a clue. As you have been advised in many of your posts, go stud

  • Force encryption on SQL Server not working? 11-30

    Hello Everyone, I'm running SQL Server 2008 64-bit. I've installed a self-signed cert on the box and set  "Force Encryption"  and restarted SQL server.  I setup a client machine to trust the authority of the cert installed on the server. When I

  • Insert SQL does not work properly when called using CALL 10-11

    I have a stored procedure (TEST_SP) which is used to insert a record in this perticular case. The SQL statement is 2526 characters long. I'm using dim Params : Params=chr(1) & "Insert query" & Chr(1) & "=300" runsql=&&q

  • PL/SQL program not working when connect database via SqlNet 10-11

    Hi, This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount retu

  • My first PL/SQL block not working with using Select query within begin 10-11

    I am new to PL/SQL , just started with basics of BLOCKS . I am having a query here in executing a block . When i am doing a insert oprtation in Blocks Begin method everything is working fine , but when ever i tried to do select operation , some error

  • Inline transform for Sql Query not working in SAP MII 12.1 Version 12.1.8 B 10-11

    Hi All, I applied an xslt for an sql query which returns an xml file. I used inline transform icon in sql query to load an xsl file which has to return me a string Any idea why is not working for me..? My Sample XML file:                             

  • SQL (Reverse) not working in Forms 6i 10-11

    Hi: Env 6i c/s 8i DB. SELECT REVERSE ( '321' ) FROM DUAL works in SQL*Plus but does not accept the REVERSE function from within a Trigger. I could put the logic in a Package on the DB but I'd like to know why it does not work in F6i ? Thanks N.Forms

  • SQL Code not working in Forms Developer? 10-11

    Hi all, I'm using Oracle 10g and I have th following code running on iSQL+ but not working on Forms and I got the following erro The SQL code:      select returningreason         from (                  select returningreason,                  dense_

  • SQL tab not working in V2.1 EA1 for non-DBA users -- how to fix? 10-11

    In v2.1 EA 1 the tab to show the SQL script (DDL) in the object browser is not working for non-DBA users. In the prior version, these users would see a message about DBMS_METADATA and then the message would indicate that an "internal generator"

  • Sql  functions in Pl/Sql region not working 10-11

    Hi all, I have created a pl/sql region like this This is the example taken from denes kubicek DECLARE    v_counter     INTEGER         := 0;    v_line        VARCHAR2 (4000);    v_rec_in_row  INTEGER         := 6; BEGIN    HTP.prn ('<table>');    HT

  • Abnormal, Same query get data in sql but not working on Fron-end 10-11

    Dear, Version :Oracle Database 11g Enterprise Edition Release - 64bit Production We have created packed in oracle database befor two months ago & was working fine, but since morning select statment in package is not working while running v

  • Oracle 10g RAC SQL profiles not working for both the nodes 11-30

    We have identified a long running sql. Used Advisor to tune the sql Applied the suggested sql_profile as per the recommendation. when we re-run the sql from application, due to RAC setup the sql hit the other node, used the sql profile as indicated b

  • SQL Statement not works using functions or subqueries-MAXDB 11-30

    Hello All, I created an ABAP program to select information about country(table: T005) with the country names (Table: T005T). I tried to create a sql query with a sql subquery to select everything but for some reason that I don't know it doesn't work.

  • Sql update not working 11-30

    Hi, I am trying to update my database with the following code but even though the code definately runs because it does get to the echos on the line before the update, the database is not getting updated. if ($totalRows_rsportsale >'0') { $_POST['dpai

  • ACCEPT in SQL script not working 11-30

    G'day Why does the following use of the 'accept' keyword not work? I want a user to be prompted to either commit or rollback but it does not work in the following 'experiment' set echo on set termout on set feedback on update emp set sal = sal*2 wher

  • T sql dose not work in SQlCompact 11-30

    im useing a T Sql in SQlCompact database but it dose not work the function is stuff() that forgathering values in on cell this is the select Statement but it shows me an error asking for help SELECT Pepole.ID, Pepole.FNA, Pepole.LNA, STUFF ((SELECT '

  • PL/SQL update not working against 9iR2 DB 11-30

    Hi, I am having a weird problem with several forms when run against a 9iR2 database. I have worked out that the problem only happens when referencing an unbound item in the WHERE clause of the update clause. For example: UPDATE table_a SET column_a =

  • SQL Report not Working 11-30

    We have this DCM report in SCCM 2007 and we want to migrate it to SCCM 2012. In SCCM 2007, this report is working when you run it in the sccm console, but does not work when you run it in sql management studio. The error that I am encountering in sql

  • PL/SQL Debugging not working on VS 2005 10-11

    Hello, I'm trying to debug a PL/SQL procedure from Oracle Explorer on Visual Studio 2005 SP1 (German), but it doesn't work. It seems as debugging runs, the process OracleDebugger.exe starts. I can even stop debugging, and the process stops. But I can