Insert space between records from open .. close dataset

I am generating a file that contains different information for a business partner with the aid of datasets. I want my records to look like this ...
partner1 BPname1 address1 contact info1   - from table1
partner2 BPname2 address2 contact info2
partner1 agency1 address1 insurance obj1  - from table2
partner2 agency2 address2 insurance obj2
But the one I am seeing in the generated file in AL11 is like this ...
partner1 BPname1 address1 contact info1
partner2 BPname2 address2 contact info2
partner1 agency1 address1
partner2 agency2 address2
I want to see a space between records from tables 1 and 2.
Code:
OPEN DATASET FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
IF SUBRC = 0
   LOOP AT TABLE1
     TRANSFER TABLE1 TO FILE
   ENDLOOP
   CLOSE DATASET
   OPEN DATASET FILE APPENDING
   IF SUBRC = 0
     TRANSFER TABLE2 TO FILE
   ELSE
     MESSAGE ERROR
   ENDIF
ELSE
   MESSAGE ERROR
ENDIF
CLOSE DATASET
Thanks.

Hi Cor,
Here is my code to create datagridview (see below)
By the way, I would like to ask if i will always declare this code every time i will do the insert , update and delete records. Let say i have separate buttons for every process. its possible to create one time and i will call this function.
Another question. can i put a auto number in the first column of Datagridview upon adding of records.
Dim conn As New System.Data.OleDb.OleDbConnection() conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\jov\Desktop\FeedBackSystem\FBSystems\FBSystems\Data\KPI.accdb"
form load event (DataGridView)
    Dim dt As New DataTable        Private cma As CurrencyManager = DirectCast(BindingContext(dt), CurrencyManager)        'Set Data GridView
        With dgvReport            dt.Columns.Add("ItemNumber", GetType(String))            dt.Columns.Add("ReportName", GetType(String))            dt.Columns.Add("Ratings", GetType(String))            dt.Columns.Add("Comment", GetType(String))            AddHandler cma.CurrentChanged, AddressOf CurrentChanged            .ReadOnly = True
            .MultiSelect = False
            .AllowUserToAddRows = False
            .AllowUserToDeleteRows = False
            dgvReport.DataSource = dt            For Each c As DataGridViewColumn In dgvReport.Columns                c.Width = 200            Next
        End With
This is the code to insert records from textbox to datagridview
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim i As Integer
dt.Rows.Add(txtItemNo.Text, CmbReportName.Text, CmbRate.Text, txtComment.Text)
End Sub

Similar Messages

  • Exclude Matches between records from a Particular Source system EDQ+Siebel UCM

    I have a requirement to modify the EDQ-CDS Individual Match processor.
    I want to exclude the match between two records (Driver and Candidate) if they have same value in a particular field and i want the Value to be hard-coded or specified as reference Data in EDQ (eg: if both driver and candidate are from same source say 'Source ABC' only then NO MATCH , for all other source records match should happen).
    We tried adding Match rule which does the 'Exact Match' comparison on the field 'source' and set the rule to 'NO MATCH' , but this is excluding the matching between records from any system, which is not my requirement. I am only looking to exclude the match when the Source value is say 'Source ABC'.
    I think it should be possible with the Comparison type  'In Value' or 'In List ' or 'All in List'. But not sure who to use these comparison rules and there is not much documentation available EDQ online.
    Any help on this appreciated.
    We are on Siebel 8.2.2.4 + EDQ 11.1.1.7  on Solaris 64 bit.

    In List is documented in the 12.1.3 online help. Before this, it was an extension to the product used by CDS.
    It is very straight-forward. You add it as a comparison, and create a reference data set with your list of values in it. If the identifier value hits the list, the comparison evaluates to true.
    I've pasted most of the help from 12.1.3 below:
    Comparison: In List
    The In List comparison provides a way of making the application of a Match rule conditional on one or both identifier values in a comparison being matched with a single value or list of values.
    Use
    Use this comparison as a way to apply a Match rule only to a subset of the data in the Match process. For example:
    Where a Match rule is designed to match Middle Eastern names, only apply it if a Country identifier matches a list of Middle Eastern countries.
    Where a Match rule is designed to match Electronic products, only apply it if a Product Category identifier matches a single value.
    The comparison may also be used to eliminate matches that would otherwise be caught by Match rules lower in the decision table, if used in a Match rule with a 'No Match' result; for example, so that matches on certain rules are only presented if Country or Nationality values are not in a list of safe values.
    Options
    Option
    Type
    Purpose
    Default Value
    Require data in both records?
    Yes/No
    If Yes, both input identifier values must contain data. If they do not, the comparison will always be 'False'.
    If No, only one input identifier value must contain data.
    No
    Match whole value?
    Yes/No
    If Yes, the whole identifier value (or values) specified must match.
    If No, tokens within the identifier will be matched against the list. In this case, delimiters must be specified in the relevant fields below to determine how to split tokens.
    No
    Required value reference data
    Reference Data
    A Reference Data set with a list of values, for example a set of country codes.
    Clear
    Required value
    Free text
    A single value to match against. Note that if a Reference Data set and a value is specified, both are matched against.
    Clear
    Require match for all values?
    Yes/No
    If Yes, all tokens in the identifier value(s) must match against the required list or value.
    If No, any one of the tokens must match.
    This option is only used if Match whole value? is set to "No".
    No
    Delimiter characters reference data
    Free text or browse
    A Reference Data set with a list of delimiter characters used to tokenize identifier values before matching against the list.
    This option is only used if Match whole value? is set to "No".
    None
    Delimiter characters
    Free text
    This field is used to specify the delimiter characters to use as an alternative to linking to a Reference Data set.
    This option is only used if Match whole value? is set to "No".
    Note: If a Reference Data list of delimiters and specific characters are entered here, both are considered delimiter characters.
    None

  • ORA-00001:Unique Constraint while inserting 2 similar records from source

    Hi,
    in TEST1 there are records:
    10 20 ABC
    10 20 DEF
    I amt trying to insert into TEST which has CODE as Primary Key.
    declare
    type cur is ref cursor;
    cur_t cur;
    type v_t is table of TEST%rowtype;
    tab v_t;
    v_act_cnt_str VARCHAR2(4000);
    v_act_cnt NUMBER:=0;
    BEGIN
    v_act_cnt_str:=' SELECT COUNT(*) '||' FROM TEST '||' WHERE '||'('||CODE||')'||' IN '||'('||'SELECT '||CODE||' FROM TEST1'||')';
    DBMS_OUTPUT.PUT_LINE('The Actual Count String is'||v_act_cnt_str);
    EXECUTE IMMEDIATE v_act_cnt_str INTO v_act_cnt;
    open cur_t for select * from TEST1 ORDER BY ROWNUM;
    loop
    fetch cur_t bulk collect into tab limit 10000;
    if v_act_cnt=0 THEN
    forall i in 1..tab.count
    insert into TEST values tab(i);
    commit;
    ELSE
    v_merge_act_str :=
    'MERGE INTO TEST '||
    ' DEST' || ' USING TEST1 '||
    ' SRC' || ' ON (' || DEST.CODE=SRC.CODE || ')' ||
    ' WHEN MATCHED THEN ';
    first_str := 'UPDATE ' || ' SET ' ||
    'DEST.NAME=SRC.NAME,DEST.DEPT_NAME=SRC.DEPT_NAME;
    execute immediate v_merge_act_str || first_str;
    v_merge_act_str := '';
    first_str := '';
    commit;
    END IF;
    end loop;
    END;
    ITS GIVING ERROR as:
    ORA-00001: unique constraint (PK_TEST1) violated
    Any help will be needful for me
    Edited by: user598986 on Sep 22, 2009 4:20 AM
    Edited by: user598986 on Sep 22, 2009 4:22 AM

    Your code makes absolutely no sense whatsover. The whole point of MERGE is that it allows us to conditionally apply records from a source table as inserts or updates to a target table. So why have you coded two separate statements? And why are you using such horrible dynamic SQL?
    Sorry to unload on you, but you seem to have your code unnecessarily complicated, and that it turn makes it unnecessarily harder to debug. As an added "bonus" this approach will also perform considerably slower than a single MERGE statement. SQL is all about set operations. Don't do anything procedurally which can be done in a set.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • How to control the  space between records in form layout

    Hi ,
    I need to display mutiple records (15-20) in a form ,
    and have choosen FORM layout as I need to display each record in two lines (Can a record be displayed in two lines in TABULAR layout ? ) .
    Now There is lot of space between each record and I could not move records closer . How can I control space between reords in FORM layout ?
    (While creating Canvas I selected Distance bwteen records = 0 )
    Thanks in advance,
    Asha

    Asha,
    no in tabular layout there is no way to display a record on two lines. All you can do is to use a stacked canvas and use it to make the table scrollable horizontally
    The distance between record setting is a property on the item level. if this is set to 0 (please double check) then all that is loeft is the item bevel. You can set the item bevel property to plain and then work on resizing the items hight until close to acceptable.
    Frank

  • How can I insert space between a bullet character and text?

    I imported my FrameMaker file and template into RoboHelp 7.
    After the conversion to RoboHelp, the bullet characters are too
    close to the paragraph text that follows. I was able to change the
    span's spacing in the Font dialog box's Spacing tab to expand the
    space. How can I apply this to all bullets in the topic?

    I am so dense... I re-read this thread.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=65&catid=680&threadid =1348980&enterthread=y
    AJ Owens suggested that we remove "Pre" from the User Defined
    HTML Tag field box in the Style Settings dialog box. When I
    initially accessed this box, I experimented with checking and
    unchecking the Convert Autonumber to HTML list box, but it never
    occurred to me to clear the User Defined HTML Tag field of "Pre".
    Now that I have cleared it, I am able to make changes in the Style
    Sheet Editor. (I can expand spacing so that I now see more space
    between the bulleted and numbered characters and the text that
    follows.)

  • Counting Record from OPEN FOR statement

    Hi,
    Is there a way to count the number of record produce by OPEN ... FOR statement...?
    I tried using %ROWCOUNT. It doesn't seems to be working. It returned me 0 though when i printed the cursor, i had 7 records.
    OPEN p_cursor FOR sqlstatement;
    pnum_record := p_cursor%ROWCOUNT;Thank you everyone!

    Dave,
    My procedure is supposed to return back the records to the caller (application)
    Below is the spec
    PROCEDURE query_licensetype (
          p_cursor     IN OUT   cursortype,
          p_num_page   IN OUT   PLS_INTEGER,
          p_string              VARCHAR2 DEFAULT NULL,
          p_pageno              PLS_INTEGER DEFAULT 1,
          p_pagerow             PLS_INTEGER DEFAULT 20,
          p_asc                 PLS_INTEGER DEFAULT 1
       )And a piece of the code that open it
    OPEN p_cursor FOR vsql USING p_string, p_string, vstart_rec, vend_rec;I am not sure how to do what you have suggested.
    Can you show me how to FETCH all the record from p_cursor and still returning back the record to the caller?
    Thanks Dave!

  • Inserting parent /child records from a xml file ...

    XML file pasted below:
    I have loaded the xml file into a table called xml_demo which has a column xml_data of type xmltype.
    The select for parent record is as follows and it works:
    INSERT INTO balit_submissions (balitdoc, documentversion, datetime_from,job_id, status,creation_datetime)
    (SELECT 'MOL'
    ,to_number(extract(x.xml_data,'/MolDocument/DocumentVersion/@v'))
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,123456
    ,'CREATED',
    NULL
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    Having problem creating child records. From this file I expect to create 3 records.
    insert into balit_energy_blocks
    SO_ID,
    DATETIME_FROM,
    DIRECTION,
    BLOCK_NUMBER,
    ENERGY,
    LAST_SUBMIT_DATETIME,
    PRICE_POUNDS,
    PRICE_EUROS,
    BALIT_REF,
    STATUS,
    LAST_EDIT_DATETIME,
    MOL_REASON,
    ACQUIRING_SO_AREA)
    (SELECT 'RTE'
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,DECODE(extract(x.xml_data,'/MolDocument/MolTimeSeries/Direction/@v'),'AO1','Up','Down')
    ,to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    ,to_number(extract(x.xml_data,'/MolDocument/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
    ,sysdate
    ,null -- price pounds
    ,null -- price euro
    ,extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v')
    ,'SUBMITTED'
    ,'A96'
    ,NULL -- acquiring area
    ,sysdate
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    For example, there are 3 ContractIdentification tags. Example of 1:
    <ContractIdentification v="RTE_20100331_1500_16"/>
    I was expecting this select to pluck the last number from this string. In this case 16.
    The select was:
    to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6
    All contractident values are concatnated and returns from position 19 onwards.
    Can anyone help me to extract the last number from each ContractIdentification tag value and to create the 3 records
    Thanks
    James Sathiaraj
    <?xml version="1.0" encoding="UTF-8"?>
    <MolDocument DtdVersion="3" DtdRelease="0">
    <DocumentIdentification v="MOL_20100331_1500_1600"/>
    <DocumentVersion v="1"/>
    <DocumentType v="A43"/>
    <SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
    <SenderRole v="A35"/>
    <ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
    <ReceiverRole v="A04"/>
    <CreationDateTime v="2010-03-31T14:10:00Z"/>
    <ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Domain codingScheme="A01" v="10YDOM-1001A001A"/>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_16"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_20"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.48"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="NG_20100331_1500_6"/>
    <ResourceProvider codingScheme="A01" v="10X1001A1001A515"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YGB----------A"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A01"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="17.0"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    </MolDocument>

    Hi,
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6In the query you tried, you access a single record so you can't expect to get three rows "magically". The EXTRACT function just works as expected, it extracts the requested nodes, but the result is still an XML fragment (a scalar value).
    In order to achieve your goal, you have to break the MolTimeSeries sequence into relational rows.
    Two similar solutions are possible, XMLTable (10gR2 and up) or Table/XMLSequence.
    In your other post you mentioned db version 10.1, so I guess we'll go with XMLSequence :
    SELECT 'RTE'
           ,to_date(substr(extractvalue(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),'yyyy-mm-dd"T"hh24:mi')
           ,decode(extractvalue(x2.column_value,'/MolTimeSeries/Direction/@v'),'A01','Up','Down')
           ,to_number(regexp_substr(extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v'),'\d+$'))
           ,to_number(extractvalue(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
           ,sysdate
           ,null
           ,null
           ,extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v')
           ,'SUBMITTED'
           ,'A96'
           ,null
           ,sysdate
    FROM xml_demo x,
         table(
           xmlsequence(
             extract(x.xml_data, '/MolDocument/MolTimeSeries')
         ) x2
    WHERE existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1;Please also note the use of REGEXP_SUBSTR instead of the regular SUBSTR because it didn't work for "NG_20100331_1500_6".
    Hope that helps.
    Edited by: odie_63 on 24 juin 2010 21:18 - added regexp comment

  • Open/Transfer/Close Dataset file not downloading

    Hello people apologies if this running rampant for me. I did post this from an attatched topic of mine but im guessing, due to its number or replies, that many people felt that it was pretty much covered. It was but another problem has riseng during my initial question.
    My plan is to download a report in a file, (hopefully in background), as it is. Obviously WS_Download would not work because (1) it doesnt seem to function in background proccessing and (2) the layout is not aligned properly. After checking this out, in this forums as well as other sits, I realized Open Dataset ought to be the best approach. Im not touching the more complex ones yet you because I plan to take this step by step. 
    So far I have searched the net and stuff and decided that I will use WWW_LIST_TO_HTML since I want to download it the way it is. I am also going to use open/close dataset as many of you have mentioned.
    SO far Im just trying it out with a simple report program to see its funcitonalities. My code goes like this.
    <b>REPORT Z**** NO STANDARD PAGE HEADING LINE-COUNT 100 .
    DATA: IFIELDS TYPE TABLE OF W3FIELDS WITH HEADER LINE.
    *DATA: ihtml TYPE TABLE OF w3html WITH HEADER LINE.
    DATA: IHTML TYPE TABLE OF W3_HTML WITH HEADER LINE.
    DATA: BEGIN OF I_TAB OCCURS 0,
    MATNR LIKE MAKT-MATNR,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_TAB.
    SELECT-OPTIONS: SO_MATNR FOR I_TAB-MATNR.
    SELECT MATNR MAKTX
    FROM MAKT
    INTO TABLE I_TAB
    WHERE MATNR IN SO_MATNR..
    LOOP AT I_TAB.
    WRITE: / I_TAB-MATNR,
    I_TAB-MAKTX.
    ENDLOOP.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
    EXPORTING
    list_index = sy-lsind
    TABLES
    HTML = IHTML.
    DATA: FILE TYPE LOCALFILE.
    FILE = '/usr/test.html'.
    OPEN DATASET FILE FOR OUTPUT IN BINARY MODE.
    LOOP AT IHTML.
    TRANSFER IHTML TO FILE.
    ENDLOOP.
    CLOSE DATASET FILE.</b>
    NOw the problem now though is that the file isnt downloading or saving at all. I cant seem to get what is wrong since the path does exist and the this seems the universal way to implement the program. Im guessing the problem lies in the file name, because everything seems to work fine. Hope to hear again soon. Sorry if people have see this twice. Again my sinceriest apologies.

    for example,  open IE,  in the address bar, I enter
    \SXXXXXX
    ,   SXXXXXX is my host name.  I hit enter.  now i see folders, one of which is USR,  then I click on the usr folder and there is my file that I created with your program. 
    Maybe ask your basis person what the host name is.
    Regards,
    Rich Heilman

  • Open dataset and close dataset

    Hi
    I need to write log file in fileshare.
    I am using the following FM to create the file.
    Z_FILE_OPEN_OUT_UNICODE'
    I have following qns
    1. do i need to use open dataset and close dataset stmts, even I create the files with the FM?

    Hi,
    you can fill in the name of the FM in transaction SE37, then click 'Display' and look at the source code and the 'Tables' tab.
    It's a custom build FM, so you might have to look at the import parameters it needs... ( Tab 'Import' and 'Tables' ).
    To answer your question, as the name of the FM suggests it will write the file for you, so no open/close dataset. Please doublecheck tab 'Source code' and you might find these statements there...
    hope that helps,
    Rolf

  • How do I insert a space between each letter? i.e. ABC becomes A B C

    I have a long strand of characters that I would like to insert spaces between and doing it manually is not practical. Can anyone suggest a shortcut or a way to save me a day of sitting and hitting right arrow space bar??

    I need to turn everything into a graph where each Letter, Number and Character is in its own column.
    In this context, set up Tabulators where each and every one is defined as centered. This way, the variable set widths of the sorts (letters, glyphs) will align vertically.
    Note that if you are working with Apple Advanced Typography or Microsoft OpenType font files, your font file may have a special subset of monospaced figure (number) sorts termed Tabular.
    The monospaced figure (number) sorts may either stand on the baseline to align with UPPER CASE or have strokes ascending above and descending below the baseline to align with lower case.
    Your font file may also have other special subsets of figure (number) sorts that are proportionately spaced. You should play with these subsets to see which figures will work well for you.
    In typography (as in photography and lithography) what looks right is rights. Intelligent fonts for composition and intelligent profiles for separation are there to help you with the visuals.
    /hh

  • Insert records from one table to other table

    Hi,
    I want to insert all the records from table 1 which are not in table 2 into table2
    o/p
    insert into table2
    select * from table1
    where a.id!=b.id;
    Please let me know is there any way that I can populate the records

    insert
      into table2
      select  *
        from  table1
        where id not in (
                         select  id
                           from  table2
                        );SY.

  • How to loop through xml records from file without ROW , /ROW tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

  • Download to application server using job open/close

    Hello people,
    Currently I am using open/close dataset to download to the application server automatically. What I do here is submit a program execute in background when the report is done the report is automatically downloaded to the application server.
    My problem now is that I want to use job open/close. With this, unfortunatley, my current method of open/close dataset will be unsuable to download to application server once the background job is done.
    My question is, is there a way for me to automatically download a file to the application server using the job open/close method?
    Thank you so much and take care.

    <b>Hi,
    What you can do is to write a report program that downloads the data to the file on the app server.
    Now, you can use the JOB_OPEN and JOB_CLOSE and submit this program in the background which will write the file.
    Regards,
    Ravi</b>
    So what you are saying is that I create two programs, where the job open/close program is the one I will run?
    Problem is that I plan to get the values of the selection-options from the original program using the program with the job open/close. How will that work.
    Thanks

  • What's the best way to delete 2.4 million of records from table?

    We are having two tables one is production one and another is temp table which data we want to insert into production table. temp table having 2.5 million of records and on the other side production table is having billions of records. the thing which we want to do just simple delete already existed records from production table and then insert the remaining records from temp to production table.
    Can anyone guide what's the best way to do this?
    Thanks,
    Waheed.

    Waheed Azhar wrote:
    production table is live and data is appending in this table on random basis. if i go insert data from temp to prod table a pk voilation exception occured bcoz already a record is exist in prod table which we are going to insert from temp to prod
    If you really just want to insert the records and don't want to update the matching ones and you're already on 10g you could use the "DML error logging" facility of the INSERT command, which would log all failed records but succeeds for the remaining ones.
    You can create a suitable exception table using the DBMS_ERRLOG.CREATE_ERROR_LOG procedure and then use the "LOG ERRORS INTO" clause of the INSERT command. Note that you can't use the "direct-path" insert mode (APPEND hint) if you expect to encounter UNIQUE CONSTRAINT violations, because this can't be logged and cause the direct-path insert to fail. Since this is a "live" table you probably don't want to use the direct-path insert anyway.
    See the manuals for more information: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB
    Sample taken from 10g manuals:
    CREATE TABLE raises (emp_id NUMBER, sal NUMBER
       CONSTRAINT check_sal CHECK(sal > 8000));
    EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');
    INSERT INTO raises
       SELECT employee_id, salary*1.1 FROM employees
       WHERE commission_pct > .2
       LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;
    SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;
    ORA_ERR_MESG$               ORA_ERR_TAG$         EMP_ID SAL
    ORA-02290: check constraint my_bad               161    7700
    (HR.SYS_C004266) violatedIf the number of rows in the temp table is not too large and you have a suitable index on the large table for the lookup you could also try to use a NOT EXISTS clause in the insert command:
    INSERT INTO <large_table>
    SELECT ...
    FROM TEMP A
    WHERE NOT EXISTS (
    SELECT NULL
    FROM <large_table> B
    WHERE B.<lookup> = A.<key>
    );But you need to check the execution plan, because a hash join using a full table scan on the <large_table> is probably something you want to avoid.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Deletion of  a particular record  from database table

    hai friends,
         i want to <b>delete</b> (or)   <b>insert</b> particular record from  predefined sap table... that is with out module pool programming...  can i delete or insert a record to or from  the table..
         thanks in advance
    @jay

    hi,
    ucan do it without module pool programming in your normal report program.
    To insert a line into an index table, use the statement:
    INSERT <line> INTO <itab> [INDEX <idx>].
    <line> is either a work area that is convertible to the line type, or the expression INITIAL LINE. If you use <wa>, the system adds a new line to the internal table <itab> and fills it with the contents of the work area. INITIAL LINE inserts a blank line containing the correct initial value for each field of the structure.
    To select the lines that you want to delete using a condition, use the following:
    DELETE FROM <target> WHERE <cond> .
    All of the lines in the database table that satisfy the conditions in the WHERE clause are deleted. The FROM expression must occur between the keyword and the database table.
    You should take particular care when programming the WHERE clause to ensure that you do not delete the wrong lines. For example, if you specify an empty internal table in a dynamic WHERE clause, all of the lines in the table are deleted.
    If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4. SY-DBCNT contains the number of lines deleted.
    regards,
    keerthi

Maybe you are looking for

  • How do I clear an email address that downloaded when I synced my phone

    All of my email addresses transferred from my yahoo account, but I don't want them all and can't seem to figure out how to delete them. Can someone help me before I print the 132 page users guide??

  • Intel iMac keeps freezing, lagging and shutting down.

    My iMac has for the past week or so repeatedly frozen, sometimes leading to it showing a blue screen forcing me to shut it down. When I then try to turn it back on, it doesn't load. However, a Safe Boot and HD restore fixes the problem temporarily. T

  • Max. no. of rows in excel

    <p>Hello,<br><br>I have a question about the maximum number of rows that an excelsheet can display. I have a drill through report which retrivesmore than 65000 records and I read that excel can display only 65Krows. Is there any setting which can be

  • I can't believe I have to ask this...   I've minimized the "Data Provider" screen....

    Post Author: black CA Forum: General Feedback What an embarassing first post... I'm new to BusinessObjects (6.5.1) and half way through building a query I've minimized the "Data Provider" screen....  and can't restore it (can't even find it)...  it's

  • Thread blocked in printStackTrace

    I find one of my thread blocked in printStackTrace after perform an overload test. But it doesn't wait any java lock. So I don't know what happened. Part of dumped thread stack looked like this: "Thread: 553" daemon prio=5 tid=0x00598f68 nid=0x23f ru