Regarding "select into" query and "no data found" exception

So i have included the following into my procedure:
select div_cd into c_div_cd
               from division_tab d, emp_tab y
               where d.div_name=y.div_text and y.emp_code=d.emp_code;
and also an exception
exception
when no data found
-- print something
The above select query results into "no data found" and the control passes directly to the exception and prints something.
How do I do the following?
select div_cd into c_div_cd
               from division_tab d, emp_tab y
               where d.div_name=y.div_text and y.emp_code=d.emp_code;
if c_div_cd is null then
--enter this employee into some other table without raising an exception
No need to write a code for an answer. Please just guide me with something I can incorporate or do.

use explicit cursors
DECLARE
c_div_cd division_tab.div_cd%type;
cursor c_div is
select div_cd
from division_tab d, emp_tab y
where d.div_name=y.div_text and y.emp_code=d.emp_code;
BEGIN
open c_div;
fetch c_div into c_div_cd;
--You can either use c_div%NOTFOUND or c_div_cd is null in the below if condition to check the data
-- Note if your select query returns multiple records then you have to do mutiple fetches for getting all records, so in that case your FETCH
-- should be inside the LOOP statement
if c_div_cd is null then
--enter this employee into some other table without raising an exception
end if;
close c_div;
EXCEPTION
IF c_div%ISOPEN then
close c_div;
END IF;
END;
Regards
JJ

Similar Messages

  • Date Picker query showing "No Data Found", works in SQLPlus

    I have created 2 Date Picker items - P2_START_DATE and P2_END_DATE. I have set the format of these to 'DD-MON-YYYY'.
    This is the query I have to select the data based on the values from the date pickers:
    select sample_date,reading from meter_data where sample_date between to_date(:P2_START_DATE,'DD-MON-YYYY') and to_date(:P2_END_DATE,'DD-MON-YYYY') order by sample_date;
    The P2_START_DATE is '20-JAN-2011', the P3_END_DATE is '21-JAN-2011'.
    The query returns "No Data Found" when run in APEX, but when I run this in SQLPlus on the host I get data:
    select sample_date,reading from meter_data where sample_date between to_date('20-JAN-2011','DD-MON-YYYY') and to_date('21-JAN-2011','DD-MON-YYYY') order by sample_date
    20-JAN-2011 .39
    20-JAN-2011 .14
    20-JAN-2011 .14
    20-JAN-2011 .18
    21-JAN-2011 .13
    Can someone explain what I'm doing wrong? I have tried a few different formats, with no luck.
    TIA

    Hi Jeff,
    My Requirement is also looks like same, but am not able figure it out the reason why am getting no data found message in my chart(report).
    Requirement:
    I have a page, where two date picker(html5) items let say P30_FROM_DATE, P30_TO_DATE are there, apart from this i have one button as well,
    when the user select the from and to date from the date picker, and as soon as click on the button (SHOW), need to display the 2D Stacked Bar Char.
    so to achieve this, i have created a blank page, under region i have created a chart (2D Stacked Bar Chart), under items--> i have created two date picker items and one button.
    my query is
    SELECT NULL LINK,
           FLOW_STATUS_CODE LABEL,
           COUNT(ORDER_NUMBER) VALUE
      FROM
           OE_ORDER_HEADERS_ALL
    WHERE
           CREATION_DATE
           BETWEEN TO_DATE(:P30_FROM_DATE,'DD-MON-YYYY') AND TO_DATE(:P30_TO_DATE,'DD-MON-YYYY')
    GROUP BY FLOW_STATUS_CODE;
    Issue:
    Once i select the From and To Date, when am click on Show button, am not able to see as desired chart, instead am getting no data found message in the chart location.
    Can you please tell me how to do this.
    i would like to know that, how do i capture those two date item values in my query, and how do i initiate my report when am pressing button.
    please revert back to my below mail.
    Regards
    Santhosh Kumar. K
    [email protected]

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • No Data Found: Exception in SQL inside PL/SQL block

    Hi Friends
    I am trying to execute an SQL SELECT stmt inside a PL/SQL block. But when i execute the procedure, it gives me No Data Found Exception.
    I know it is because no row is fetched in the query, but the condition of the SELECT query i have specified is being satisfied, i have checked it by running it on the SQL prompt.
    But somehow, it is not running from inside the PL/SQL procedure.Can anybody help me out on this as to why is this happening?? I am giving my code for reference and have Highlighted the Query inside it:
    CREATE OR REPLACE procedure insert_sfdc_account
    as
    --DECLARE
    CURSOR C1 IS
    SELECT customer_code, name1, name2, name3, name4, phone_number, fax, web_address, industry_sector, customer_profile, customer_type,
    address, city, postal_code, country_key, zzcust_type, vat_code
    FROM load_cust_general
    WHERE account_group = 'ZSIT';
    v_cust_cur c1%ROWTYPE;
    -- type sales_tab is table of load_cust_sales_area%rowtype;
    v_sales_area load_cust_sales_area%ROWTYPE;
    -- v_sales_area sales_tab;
         v_salesorg varchar2(10);
         v_sales_district varchar2(10);
         v_salesoff varchar2(10);
         v_custgrp varchar2(10);
         v_salesgrp varchar2(10);
    v_type varchar2(20);
    v_nature varchar2(10);
    v_partner_code varchar2(10);
    v_parent_cust varchar2(20);
    v_credit_blk varchar2(20);
    BEGIN
    open c1;
    loop
    fetch c1 into v_cust_cur;
    exit when c1%NOTFOUND;
    for i in (SELECT customer_code, salesorg from load_cust_partner
    where customer_code = v_cust_cur.customer_code ) LOOP
    dbms_output.put_line(v_cust_cur.customer_code );
                        SELECT partner_code into v_partner_code from load_cust_partner
    where customer_code = i.customer_code and salesorg = i.salesorg and partner_function = 'Z1';
    dbms_output.put_line(v_partner_code||i.customer_code);
    SELECT salesorg, sales_district, salesoff, salesgrp, custgrp INTO v_salesorg, v_sales_district, v_salesoff, v_salesgrp, v_custgrp FROM load_cust_sales_area
              WHERE customer_code = i.customer_code and salesorg = i.salesorg;
                   dbms_output.put_line(v_salesorg||i.salesorg);
                        SELECT parent_customer INTO v_parent_cust from load_cust_hierarchy
    WHERE customer_code = i.customer_code and salesorg = i.salesorg and hierarchy_type = 'G'; dbms_output.put_line(v_parent_cust);
                        SELECT credit_block INTO v_credit_blk from load_cust_company_cod
              WHERE customer_code = i.customer_code;
    dbms_output.put_line(v_credit_blk);
    for j in (SELECT account_group, customer_type from load_cust_general
    where customer_code IN (select customer_code from load_cust_partner
                                  where partner_code = i.customer_code and salesorg = i.salesorg and partner_function = 'ZS'))
                                                      LOOP
    -- exit when j%NOTFOUND;
         dbms_output.put_line(j.account_group);
    if (j.account_group = 'ZDIS') THEN
    v_type := 'DISAC';
              v_nature := '06';
         --     EXIT ;
    else
    v_type := 'SPACC';
    v_nature := '01';
    END IF;
    dbms_output.put_line(v_type||' '||v_nature);
    END LOOP;
    INSERT INTO sfdc_account
              (SAP_ACCOUNT_ID__C, NAME, TYPE, RECORDTYPEID, PARENTID, PHONE, FAX, WEBSITE, OWNERID, MARKETING_DOMAIN__C,
    INDUSTRIAL_SECTOR__C, ABC_CLASSIFICATION__C, NAME_1__C, NAME_2__C, NAME_3__C, NAME_4__C, PAYMENT_STATUS__C,
    CUSTOMER_GROUP__C, ADDRESS_STREET__C, CITY__C, POSTAL_CODE__C, COUNTRY__C, SALES_OFFICE__C, SALESORG__C,
    SALESDISTRICT__C, SALESGROUP__C, NATURE__C, VATCODE__C)
    VALUES((i.customer_code||i.salesorg), (v_cust_cur.Name1||' '||v_cust_cur.name2), ' ', v_type, v_parent_cust,
    v_cust_cur.phone_number, v_cust_cur.fax, v_cust_cur.web_address, v_partner_code, SUBSTR(v_cust_cur.industry_sector,1,2),
    v_cust_cur.industry_sector, v_cust_cur.customer_profile, v_cust_cur.name1, v_cust_cur.name2, v_cust_cur.name3,
    v_cust_cur.name4, v_credit_blk, v_custgrp, v_cust_cur.address, v_cust_cur.city, v_cust_cur.postal_code,
    v_cust_cur.country_key, v_salesoff, v_salesorg, v_sales_district,
    v_salesgrp, v_nature, v_cust_cur.vat_code);
    end loop;
    end loop;
    CLOSE c1;
    -- Delete data from Load Table
    -- EXECUTE IMMEDIATE 'TRUNCATE TABLE load_cust_general';
    /* truncate table load_cust_partner;
    truncate table load_cust_hierarhy;
    truncate table load_cust_sales_area;
    truncate table load_cust_company_cod;
    commit;
    exception
    when others then
    raise_application_error( -20001, substr( sqlerrm, 1, 150 ) );
    END;
    Kindly Help.....
    Thanks and Regards

    Create the procedure again and execute it in SQL*Plus environment and paste the output:
    CREATE OR REPLACE procedure insert_sfdc_account
    as
    --DECLARE
    CURSOR C1 IS
    SELECT customer_code, name1, name2, name3, name4, phone_number, fax, web_address, industry_sector, customer_profile, customer_type,
    address, city, postal_code, country_key, zzcust_type, vat_code
    FROM load_cust_general
    WHERE account_group = 'ZSIT';
    v_cust_cur c1%ROWTYPE;
    -- type sales_tab is table of load_cust_sales_area%rowtype;
    v_sales_area load_cust_sales_area%ROWTYPE;
    -- v_sales_area sales_tab;
    v_salesorg varchar2(10);
    v_sales_district varchar2(10);
    v_salesoff varchar2(10);
    v_custgrp varchar2(10);
    v_salesgrp varchar2(10);
    v_type varchar2(20);
    v_nature varchar2(10);
    v_partner_code varchar2(10);
    v_parent_cust varchar2(20);
    v_credit_blk varchar2(20);
    BEGIN
    open c1;
    loop
    fetch c1 into v_cust_cur;
    exit when c1%NOTFOUND;
    for i in (SELECT customer_code, salesorg from load_cust_partner
    where customer_code = v_cust_cur.customer_code ) LOOP
    SELECT partner_code into v_partner_code from load_cust_partner
    where customer_code = i.customer_code and salesorg = i.salesorg and partner_function = 'Z1';
    SELECT salesorg, sales_district, salesoff, salesgrp, custgrp INTO v_salesorg, v_sales_district, v_salesoff, v_salesgrp, v_custgrp FROM load_cust_sales_area
    WHERE customer_code = i.customer_code and salesorg = i.salesorg;
    dbms_output.put_line('Customer_Code : '|| i.customer_code);
    dbms_output.put_line('SalesOrg : '|| i.salesorg);
    SELECT parent_customer INTO v_parent_cust from load_cust_hierarchy
    WHERE customer_code = i.customer_code and salesorg = i.salesorg and hierarchy_type = 'G';
    dbms_output.put_line('Successfully Executed SQL st. Error is somewhere else');
    SELECT credit_block INTO v_credit_blk from load_cust_company_cod
    WHERE customer_code = i.customer_code;
    for j in (SELECT account_group, customer_type from load_cust_general
    where customer_code IN (select customer_code from load_cust_partner
    where partner_code = i.customer_code and salesorg = i.salesorg and partner_function = 'ZS'))
    LOOP
    -- exit when j%NOTFOUND;
    if (j.account_group = 'ZDIS') THEN
    v_type := 'DISAC';
    v_nature := '06';
    -- EXIT ;
    else
    v_type := 'SPACC';
    v_nature := '01';
    END IF;
    END LOOP;
    INSERT INTO sfdc_account
    (SAP_ACCOUNT_ID__C, NAME, TYPE, RECORDTYPEID, PARENTID, PHONE, FAX, WEBSITE, OWNERID, MARKETING_DOMAIN__C,
    INDUSTRIAL_SECTOR__C, ABC_CLASSIFICATION__C, NAME_1__C, NAME_2__C, NAME_3__C, NAME_4__C, PAYMENT_STATUS__C,
    CUSTOMER_GROUP__C, ADDRESS_STREET__C, CITY__C, POSTAL_CODE__C, COUNTRY__C, SALES_OFFICE__C, SALESORG__C,
    SALESDISTRICT__C, SALESGROUP__C, NATURE__C, VATCODE__C)
    VALUES((i.customer_code||i.salesorg), (v_cust_cur.Name1||' '||v_cust_cur.name2), ' ', v_type, v_parent_cust,
    v_cust_cur.phone_number, v_cust_cur.fax, v_cust_cur.web_address, v_partner_code, SUBSTR(v_cust_cur.industry_sector,1,2),
    v_cust_cur.industry_sector, v_cust_cur.customer_profile, v_cust_cur.name1, v_cust_cur.name2, v_cust_cur.name3,
    v_cust_cur.name4, v_credit_blk, v_custgrp, v_cust_cur.address, v_cust_cur.city, v_cust_cur.postal_code,
    v_cust_cur.country_key, v_salesoff, v_salesorg, v_sales_district,
    v_salesgrp, v_nature, v_cust_cur.vat_code);
    end loop;
    end loop;
    CLOSE c1;
    -- Delete data from Load Table
    -- EXECUTE IMMEDIATE 'TRUNCATE TABLE load_cust_general';
    /* truncate table load_cust_partner;
    truncate table load_cust_hierarhy;
    truncate table load_cust_sales_area;
    truncate table load_cust_company_cod;
    commit;
    exception
    when others then
    raise_application_error( -20001, substr( sqlerrm, 1, 150 ) );
    END;
    SQL> set serveroutput on
    SQL> exec insert_sfdc_account;

  • No Data Found Exception

    I'm getting No Data found exception while selecting a query.
    I'm trying to insert into a table by selecting records from a table.
    I'm doing this inside a loop. So I need to continue with insertion even though i get this error( NO DATA FOUND). How can this be done?
    Any help?
    Eg.
    FOR id IN (select Emp_ID from Table A)
    Begin
    LOOP
    BEGIN
    Select COL_B INTO Var_X from Table B where COL_C = id.EMPID;
    EXCEPTION
    NO DATA FOUND ---- I need to go for insertion even though i get this error
    END
    ---- Insertion Goes here to TABLE_C
    ----- Inserting VAR_X into the TABLE_C along with other Columns
    END LOOP
    END
    Thanks
    Harshini

    What you have should work. Are you saying thet the exception handler doesn't catch the exception? If that is the case then it must be another exception. You could change the exceptiuon handler to be a when others (which will catch everything) or you could just decalre a cursor which you open, fetch from, and then close. If no data is found you won't get an exception, but your variables won't be null unless you reset them every time you go round the loop.
    Obviously the no data found exception is actually no_data_found (i.e. with underscores) but your code wouldn't compile if you missed out the underscores so you must have that right.

  • No Data Found Exception in bulk updates

    I am trying to catch no data found exception in bulk updates when it does not find a record to update in the forall loop.
    OPEN casualty;
    LOOP
    FETCH casulaty
    BULK COLLECT INTO v_cas,v_adj,v_nbr
    LIMIT 10000;
    FORALL i IN 1..v_cas.count
    UPDATE tpl_casualty
         set casualty_amt = (select amt from tpl_adjustment where cas_adj = v_adj(i))
         where cas_nbr = v_nbr(i);
    EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('exception')
    I get this error at the line where i have exception:
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    Can someone pls direct me on how to get around this?
    If I do not handle this exception, the script fails when it attempts to update a record that does not exist and the error says : no data found exception.
    Thanks for your help.
    Edited by: user8848256 on Nov 13, 2009 6:15 PM

    No Data Found isn't an exception raised when an UPDATE cannot find any records to process.
    SQL%ROWCOUNT can be used to determine the number of rows affected by an update statement, but if 0 rows are updated then no exception will be raised (it's just not how things work).
    If you post your actual CURSOR (casualty) declaration, it's quite possible we can help you create a single SQL statement to meet your requirement (a single SQL will be faster than your current implementation).
    Have you looked in to using the MERGE command?

  • IR report - No Data Found exception

    Hi,
    I have created one IR report in apex. I need to get the no data found exception on this report i.e. if user enters some search keywords and he is getting no data in that case want to store the searched keywords in the database for future reference that there is no data for such search criteria.
    Could anyone help me to catch the no data found exception and executing a pl-sql process for fetching the search criteria ?
    Thanks in advance!

    I have created an IR report based on collections. But still I am not able to understand where I can write a code for EXCEPTION NO_DATA_FOUND. The pl-sql code used to create a collection which we write in before header process and the actuall IR report which is build using SQL query on collection so where can I put the exception code?
    What I want is to catch no data found exception when user types something in IR report search bar and gets nothing as a search result. Can you please help me on this?
    Thanks,
    Punam

  • No data found exception: no data found:  [1299] error in Procedure

    Hi all,
    I am getting "no data found exception: no data found:  [1299] " in SAP HANA procedure, even if data for the corresponding plant and material is present in the respective tables.
    Can any-one suggest why I am getting this and what would be the resolution of the same.
    Regards
    dhinesh.

    Hi Dhinesh,
    Ok. It seems you have some condition in your SQL and it gets fail. It is best practice to capture SQL exception in all your store procedure to avoid such errors .
    Either you can capture the exception and write in a table if your procedure runs in background or simply throw the SQL exception message from dummy table.
    Check exceptional handling in SAP Documentation
    Thanks
    Siva

  • How to fetch NO DATA FOUND exception in Ref Cursor.

    In my procedure ref cursor is out parameter with returns dataset. in my proceudre
    its like...
    OPEN pPymtCur FOR
    select.....
    when I call this procedure from report to get dataset it causes NO DATA FOUND exception.
    How to fetch this exception in my oracle procedure so I can get some other data.
    Any Idea to do this?
    Edited by: Meghna on 17-Jun-2009 22:28

    Mass25 wrote:
    Correct me if I am wrong.
    So if I do something as follows in my stored proc, I do not have to check for NO_DATA_FOUND?
    OPEN my_CuRSR FOR
          SELECT DISTINCT blah blah blahmy_cursr is what I am returning as OUT param in my SP.Correct. At the point you open the cursor, oracle has not attempted any 'fetch' against the data so it won't know if there is any data or no data. that only occurs when a fetch is attempted.
    Take a read of this:
    [PL/SQL 101 : Understanding Ref Cursors|http://forums.oracle.com/forums/thread.jspa?threadID=886365&tstart=0]

  • Report Query returning "No Data Found" with bind variables

    I put a simple query into Report Query:
    Select "bluefish". "name" as "name",
    "bluefish"."primary_flag" as "primary_flag",
    "bluefish"."status" as "status",
    "bluefish"."ID" as "ID" from "bluefish" "bluefish" where "bluefish"."ID" = :P3_XPRINTID
    When I test the query, data is returned; however, when I try to run the query using "Test Report" button, I get an error 01403 No Data Found. If I replace the bind variable with an explicit value, the report works.
    Anyone have any ideas as to what is causing this problem? I am using the Generic Report Layout, with various output types. I AM editting the query and defining the bind variable before I test the report (otherwise, the query wouldn't run).
    Charles

    Sometimes if you create a form/report/whatever using the wizards, it will create an After Submit process called something like Reset Page - basically you want to make sure you don't have any After Submit processes that call a Clear Session state (it may say something like Clear Cache for Page).
    In your branch, there is also a box that says Clear Cache - you want to make sure that does not have page Number 8 in it or it will clear your session state.
    Put the page in Debug mode and read through it - check to make sure your value is getting saved and maybe you can see what is going wrong.

  • How Do I Filter a Report Using a Multi Select List Box and Specifying Date Between Begin Date and End Date

    Hope someone can help.  I have tried to find the best way to do this and can't seem to make sense of anything.  I'm using an Access 2013 Database and I have a report that is based on a query.  I've created a Report Criteria Form.  I
    need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date.  I then need my report to return only the records that meet all selected criteria.  It works fine with a ComboBox and 1 selection but can't
    get it to work with a List Box so they can select multiple items.  Any help is greatly appreciated while I still have hair left. 

    The query should return all records.
    Let's say you have the following controls on your report criteria form:
    txtStart: text box, formatted as a date.
    txtEnd: text box, formatted as a date.
    lbxMulti: multi-select list box.
    cmdOpenReport: command button used to open the report.
    The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
    The report to be opened is rptReport.
    The On Click event procedure for the command button could look like this:
    Private Sub cmdOpenReport_Click()
    Dim strWhere As String
    Dim strIn As String
    Dim varItm As Variant
    On Error GoTo ErrHandler
    If Not IsNull(Me.txtStart) Then
    strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
    End If
    If Not IsNull(Me.txtEnd) Then
    strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
    End If
    For Each varItm In Me.lbxMulti.ItemsSelected
    strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    Next varItm
    If strIn <> "" Then
    ' Remove initial comma
    strIn = Mid(strIn, 2)
    strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
    End If
    If strWhere <> "" Then
    ' Remove initial " AND "
    strWhere = Mid(strWhere, 6)
    End If
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
    Exit Sub
    ErrHandler:
    If Err = 2501 Then
    ' Report cancelled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub
    If SomeField is a text field instead of a number field, change the line
            strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
    to
            strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Using SELECT INTO statement to transfer data from one DB to another?

    Hello,
    I need to move data from an SAP table to another downstream SQL server box without flat file in between. I have set up the DBCON interface, so that my ABAP code on SAP can connect to the remote SQL Server, then I can run INSERT command as Native SQL inside the ABAP.
    However, INSERT has performance problem. The best performer as I can find is SELECT INTO statement. But then I am stuck at how to use SELECT INTO to query my local SAP table and send (via INTO) to remote database. I am not even sure whether I should use Open SQL or Native SQL.
    Any suggestion? BTW, I understand the limitation of Native SQL, but we are OK to use it.
    Thanks!

    It appears that this is some kind of migration project due to the scope of the data contained in the single file? If so whatever you do is like ly to be trow away once the migration of data is completed.
    You have a couple of options:
    1) Get the data extracted from HFM in multiple files instead of one bulk file, broken down by scanario,year & period
    2) Take the single data dump file produced by FDM and manipulate it yourself to get the data in a more usuable format for processing through FDM.
    Option 2 could be achieved via any ETL tool or a custom file parsing script. What may be more attractive to you and allow you to fully leverage your investment in FDM is that you could use the PULL adapter that ships as part of the FDM adapter suite to perform this transformation exercise. The PULL adapter takes a flat file input and allows you to use all the in built functionality of FDM to transform it and output a modified flat file (or series of flat files). You could use it to produce multioload files or a series of files broken down by scenario,year,period.
    Whatever you do I would suggest that break the single data file down into smaller chunks as this will help with the iterative debugging process you will inevitably have to undetake whislt migrating the data to the new application.

  • "select into" query statements using the DI API

    I am trying to use the DI API (6.5) t create a temp table based on an existing table.  For example, here is a query string....
    select * into ORDR_TEMP from ORDR
    Code...
    oRecordSet := IRecordset(oCompany.GetBusinessObject(BoRecordset));
    oRecordset.DoQuery(sSql);
    Error I get...
    1). [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use SELECT INTO in browse mode. 2). [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared
    For any other regular select statements the previous code works.  Does anyone know for sure if a "select into" statement is not possible using the DI API?

    Hi Bill,
    I´m not really sure if select into is avaiable. But here you´ve got a hint: You could use a user defined function to do it, and just call the function from your code.
    SELECT dbo.MyFunction()
    Having this function defined in your SQL Server:
    CREATE function MyFunction ()
    returns char(2)
    AS
    Begin
    select * into ORDR_TEMP from ORDR
    Return ('OK')
    End
    Hope this helps,
    Ibai Peñ

  • Querying and Assigning Date Value

    Hello, this query is not working. I am trying to assign the date value to the from_date variable.
    set result_list [execsql "select TCM_DATE_BEGIN_REQD into: TO_CHAR(from_date, 'YYYY/MM/DD') from tcm_tau_component where tcm_reference_number = $tau_reference_number" ]
    This is the error I get:
    The following bind variable(s) are not defined:
    Please help.

    I don't know what language this is but you're trying to select into a format mask. That looks suspicious. Try this:
    select TO_CHAR(TCM_DATE_BEGIN_REQD, 'YYYY/MM/DD') into :from_date ...

  • Tabular Form and Link to document and No Data Found error

    I have used this numerous times in an INTERACTIVE REPORT to link records out from the report to a document in a folder on our server and it works beautifully thanks to one of you guys who helped me a couple of years ago. In the column for which I want to use as a link I do the following:
    LINK TEST #ISO_NUMBER#
    LINK ATTRIBUTES a href=#DOC_LINK#; TARGET="_BLANK"
    URL #DOC_LINK#
    I've been banging my head against the wall trying to figure out why I keep getting a 'No data found' error in my TABULAR FORM. The good news is I figured out why it's happening. The bad news is I do need to link out to the documents listed in my tabular form that are saved on the server.
    Is there any other way to do this?
    Application Express 4.0.0.00.46
    TIA,
    Alexandra

    Finally back...
    I have a tabular form that lists documents stored on one of our servers. In an interactive report I can set up a link to those docs using the document number column in the IR. I can't get it to work in the same way on the tabular form. Hopefully the steps of the catalog process will shed light on what may be the problem:
    Step One
    1. User1 catalogs doument using standard form (page 3) on DOC_INFO table.
    2. Button on form redirects to Approval Tabular Form (for this example, page 100). This tabular form displays DOCUMENT_NUMBER (display as text saves state), APPROVER (select list), APPROVED(select list), RELEASED (select list) fields among others from DOC_APPRV_DOC table
    3. Add Row adds fields in #2 above and other fields
    4. User1 selects APPROVER in select list and Adds Row for all additional APPROVERS required
    5. User1 hits SUBMIT button
    Step Two
    1. User2 opens different page but Approval Tabular Form (for this example, page 200) on same DOC_APPRV_DOC table, restricted to :P101_USERNAME
    2. User2 uses APPROVED select list to approve or reject
    3. User2 hits SUBMIT button
    Step Three
    1. User1 opens Approval Tabular Form (page 100) with User2 (and all other documents requiring approval) results
    2. If rejected User1 uses Reset Approval checkbox and select list on User2's tabular form is reset
    3. If approved User1 uses Released submit list and and record is deleted from User2's tabular form
    The Problem
    User2 ought to be able to review each of these documents on the server. In other parts of my application, an interactive report is used, I've got a case statement in the report creating the link, and have the column itself setup up so that User2 merely clicks on the DOCUMENT_NUMBER on the report and he's redirected to the document itself.
    This works fine when set up the same way on the tabular form ONLY THE FIRST TIME a row is added. If I ADD ROW for any additional documents the DOCUMENT_NUMBER field on the tabular form does not populate on User1's form.
    The entire process works beautifully if the link is not set up.
    Note that from the standard form, the DOCUMENT_NUMBER is sent to a hidden item (default = :P3_DOCUMENT_NUMBER) in a region above the tabular form (page 100). This is then used to populate the DOCUMENT_NUMBER on the tabular form as the default value (:P200_DOCUMENT_NUMBER).
    Your thoughts? Thanks in advance!
    Alexandra

Maybe you are looking for

  • What is the real time use of implicit and explicit cursors in pl/sql

    what is the real time use of implicit and explicit cursors in pl/sql.............please tell me

  • Control surface and interface at the same time

    Is it possible to plug in a control surface and an interface at the same time? My plan is to use a Mackie Control Universal Pro (USB) for my control surface and a Focusrite Saffire Pro 40 IO Firewire Interface for monitor use during mixing. Will Logi

  • Without commercial invoice creat excise invoice

    Hi, In domostic sales with out commercial invoice is it possible to creat Excise invoice ?.... and please tell me how

  • Ask; Snake n ladder quizz

    Hello friends, I want to ask,,, anyone can help me? I'm learning to make a quiz game snakes and ladders, how to play is when before rolling the dice a player must answer the question arises, if the correct answer then the player can play dice. but if

  • Line Spacing in Dreamweaver CC

    Hi, I'm working with an html file in Dreamweaver CC. I'm trying to create a single spaced line. When I press "Shift Enter" at the end of a sentence I do indeed get a single spaced line to follow. However, it assumes the same formatting from the line