I have these three tables data and i want this report as given below

here cpv means cash payment voucher<pre>i have voucher header tableVoucher Voucher Voucher Entry ID Type Date Date1 CPV 2014-12-10 16:47:00 0 2014-12-10 00:00:00
1 CRV 2014-12-10 16:22:00 0 2014-12-10 00:00:00
1 JV 2014-12-10 16:49:00 ccc 0 2014-12-10 00:00:00
2 CPV 2014-12-10 16:51:00 sss 0 2014-12-10 00:00:00
2 CRV 2014-12-10 16:59:00 0 2014-12-10 00:00:00
2 JV 2014-12-20 14:31:00 0 2014-12-20 00:00:00
3 CPV 2014-12-20 14:33:00 0 2014-12-20 00:00:00
3 CRV 2014-12-13 15:02:00 0 2014-12-13 00:00:00
3 JV 2014-12-13 15:02:00 0 2014-12-20 00:00:00
4 CPV 2014-12-20 14:33:00 0 2014-12-20 00:00:00
4 CRV 2014-12-13 15:13:00 0 2014-12-13 00:00:00
4 JV 2014-12-23 00:21:00 0 2014-12-23 00:00:00
5 CPV 2014-12-20 20:50:00 0 2014-12-20 00:00:00
5 CRV 2014-12-14 23:39:00 0 2014-12-14 00:00:00
5 JV 2014-12-23 00:24:00 0 2014-12-23 00:00:00
6 CPV 2014-12-20 22:43:00 0 2014-12-20 00:00:00
6 CRV 2014-12-14 23:40:00 0 2014-12-14 00:00:00 select VoucherID,VoucherType,Remarks ,Debit,Credit from voucherbody
1 CRV fsdd 0.000000000 44.000000000
1 JV xccc 4.000000000 4.000000000
2 CRV sdf 0.000000000 40.000000000
2 CPV ss 33.000000000 0.000000000
1 CPV cxvx 43.000000000 0.000000000
3 CRV 0.000000000 33.000000000
4 CRV 0.000000000 200.000000000
5 CRV 0.000000000 3444.000000000
6 CRV 0.000000000 343333.000000000
2 JV 300.000000000 300.000000000
3 CPV 40000.000000000 0.000000000
7 CRV 0.000000000 34.000000000
8 CRV 0.000000000 4000.000000000
9 CRV ss 0.000000000 3444.000000000
4 CPV 345.000000000 0.000000000
5 CPV 230.000000000 0.000000000
3 JV 4000.000000000 4000.000000000
6 CPV 2.000000000 0.000000000
7 CPV 3432.000000000 0.000000000
8 CPV 222.000000000 0.000000000
9 CPV 2000.000000000 0.000000000
10 CPV 233.000000000 0.000000000
11 CPV 3444.000000000 0.000000000
10 CRV 0.000000000 45555.000000000
12 CPV 333.000000000 0.000000000
13 CPV 344.000000000 0.000000000
14 CPV 4555.000000000 0.000000000
15 CPV 455.000000000 0.000000000
16 CPV 2222.000000000 0.000000000
17 CPV 333.000000000 0.000000000
18 CPV ss 232.000000000 0.000000000
19 CPV 222.000000000 0.000000000
11 CRV 0.000000000 2222.000000000
4 JV xx 200.000000000 200.000000000
12 CRV 0.000000000 333.000000000
20 CPV 3333.000000000 0.000000000
13 CRV 0.000000000 3333.000000000
14 CRV 0.000000000 4444.000000000
5 JV 33.000000000 33.000000000
21 CPV ssss 2222.000000000 0.000000000
22 CPV wsss 2222.000000000 0.000000000
23 CPV 22222.000000000 0.000000000
24 CPV qqq 1111.000000000 0.000000000
25 CPV 222.000000000 0.000000000
26 CPV 2222.000000000 0.000000000
15 CRV qqqq 0.000000000 11111.000000000
16 CRV 0.000000000 2000.000000000
27 CPV 10000.000000000 0.000000000
28 CPV 23.000000000 0.000000000select AccountNo,AccountTitle,AccountType,OpeningDebit,OpeningCredit from AccountChart100001 Majid ASSET 2000.000000000 3000.000000000
100002 Salman ASSET 2999.000000000 1000.000000000
100003 Kamran ASSET 4000.000000000 4500.000000000
100004 Arif ASSET 3000.000000000 2000.000000000
100005 Aslam ASSET 2000.000000000 50000.000000000
100006 Akram ASSET 30.000000000 454.000000000
100007 Sohail ASSET 3.000000000 353.000000000
100008 Kashif ASSET 78897.000000000 7879.000000000
100009 Asif ASSET 4200.000000000 3242.000000000
100010 Tajmul ASSET 1111123.000000000 3000.000000000
100011 Kamran ASSET 3.000000000 113.000000000
100012 Taswer ASSET 2000.000000000 1000.000000000
100013 dfd ASSET 2000.000000000 1000.000000000
100014 Tameer ASSET 3000.000000000 2000.000000000
100015 No Name ASSET 5000.000000000 1999.000000000
100016 Saleem ASSET 3339.000000000 9999.000000000
100017 Awais ASSET 6000.000000000 4000.000000000
100018 Abid ASSET 4000.000000000 1000.000000000
200001 Muazam LIABILITY 500.000000000 0.000000000i want this report as given below from above tables account no AccountTitle accounttype Debit Credit1 CRV fsdd 0.000000000 44.0000000001 cash fsdd 44.000000000 0.000000000</pre>

SELECT AC.AccountNo
,AC.AccountTitle
,AC.AccountType
,VB.Debit
,VB.Credit
FROM voucherheader VH
INNER JOIN voucherbody VB ON VH.VoucherID = VB.VoucherID
INNER JOIN AccountChart AC ON AC.AccountNo = VH.AccountNohere voucher header has voucherID and not Accountnoit is showing error at vh.accountno

Similar Messages

  • I have lost my calendar data and am having a hard time retrieving it from Time Capsule. Can anyone help? I am using Mountain lion OS

    I have lost my iCal data and am having a hard time retrieving it from Time Capsule. I am using Mountain Lion OS om iMac. Can anyone help?

    You cannot see it because it is hidden.. one of those great things apple does.. if it is hidden in your Mac then it will be hidden in the Time Machine Backup.
    You will need to restore the entire folder to a different location.. and unhide it.
    There is some info here about restoring particular files or folders.
    http://pondini.org/TM/16.html
    And some info from Lion which should also relate to Mountain Lion.
    https://discussions.apple.com/thread/3231381?start=0&tstart=0
    There is stuff about recovery near the end.
    One wonders sometimes when Apple make these decisions if they ever think about what happens when something goes wrong. Hiding files..???

  • Accessing sap tables data and display in webi

    Hi all,
    i installed business objects edge series.
    i want to access SAP tables data and display in webi for adhoc reporting.
    Is there any process to achieve this.

    Hi
    currently (April 2010) you have the following options:
    1. You load your R/3 data into an SAP BW and use universes based on BEx queries to create WebI reports
    2. You can use SAP rapid marts. They contain Data integrator mappings (you need an installation of the DI for this) to extract and load your SAP R/3 data into a relational database. Additionally they provide universes (based on a relational schema) hich ill allo you to build WebI reports.
    3. You can use the R/3 connector for the Data Federator (You need a DF installation for this). Please note that the R/3 connector is not yet a product rather just a PROTOTYPE. Take a look here: SAP BusinessObjects Web Intelligence Reporting for SAP ERP [original link is broken]
    4. You can try to access the underlying database directly using the appropriate DB drivers. Please note that this is NOT RECOMMENDED. This way you cannot leverage security defined on the R/3 side in your WebI reports and you will not be able to access all data as available in R/3 since some of them are stored encoded/compressed in the underlying tables.
    5. Instead of WebI you can use Crystal Reports and the R/3 drivers (eg. SAP Tables, Functions, Cluster) provided when installing the integration kit for SAP.
    Regards,
    Stratos

  • How to compare table data and table field

    Hi buddy,
        I have some question about how to compare table data and table field.
       1. I know there is one method:   CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS  , it use in unit test to compare the table data(A and B) , you can loop table A into structure A1, then use this mehtod it can compare whether table B contain structure A1.  but when I try to use this in main program it will dump.
              CL_ABAP_UNIT_ASSERT=>ASSERT_TABLE_CONTAINS(
                                                                                                        LINE    = A1
                                                                                                        TABLE = B ).
           Is there any method or FM can be used to compare the table data ?
        2. I also want to compare two table field , try to find out the different. How to realize this.
    Thank you for your sincerely answer.

    Hi Zongjie,
    What`s the difference, if you using loop A into wa_A, read table B into wa_B with all field, then compare with wa_A and wa_B.
    The question 2, seems no standard FM available here.
    Loop A into wa_A.
       Loop B into wa_B.
           if wa_A-field1 eq wa_B-field1.
           endif.
            if wa_A-field2 eq wa_B-field2. 
           endif.
       endloop.
    endloop.
    regards,
    Archer

  • Modify table data and import to same bapi function module

    Hai friends,
    I have a requirement on bapi , such that after executing the bapi function module data comes on tables and again  i need enter  weight in weight column field in the same table data and pass the same table in the same bapi function module .
    plz sujjest.
    with reagards,
    prasad.

    Can  u explain in details,
    means which bapi r u using? where  u will enter weight? etc.

  • How to make a copy of an application with its schema-tables,data and all

    Good day,
    I am looking for the best way to make a copy of an application from one computer to another, including the schema (tables, data and all) in Apex3.2.
    I can only manage to make a copy of the application without the data using the export utility
    Please assist with this difficulty
    Kind Regards
    Thabo
    Edited by: Thabo K on Jun 1, 2009 1:13 AM

    Hello,
    To copy across the data you can use the traditional EXP/IMP or the Datapump utility.
    If you're used to using EXP/IMP I'd encourage you to look at Datapump, if you haven't used EXP/IMP before I'd encourage you to look at Datapump (datapump rocks) -
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
    There are a few major differences between Datapump and traditional EXP/IMP (EXP/IMP creates the export file on the client side, Datapump creates it on the server side etc).
    In my book "Pro Oracle Application Express" I have a section on cloning applications/data between instances, which you might find useful.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • How to use Innerjoin b/w these 2 tables VBAK and CDHDR ?

    Hi,
              How to use Innerjoin b/w these 2 tables VBAK and CDHDR for retrieving of changed sales order data ?I nned the A select stmt with INNER JOIN for changed sales data.
    Thanks & Regards,
    gopi.

    Hi Gopi,
    You can use the code similar to below to read the changes to Sales order from CDHDR AND CDPOS
    FORM GET_CHANGES .
    * Get all the changes to Sales Order as well as Deliveries. Suppress
    * Non relevant change
      DATA : BEGIN OF SO_VBELN OCCURS 0 ,
           VBELN LIKE CDHDR-OBJECTID,
           END OF SO_VBELN.
      DATA : BEGIN OF DL_VBELN OCCURS 0 ,
           VBELN LIKE CDHDR-OBJECTID,
           END OF DL_VBELN.
      DATA TEMP_SO_VBELN LIKE SO_VBELN OCCURS 0 WITH HEADER LINE.
      DATA DATE_UNTIL LIKE SY-DATUM.
      DATA TIME_UNTIL LIKE SY-UZEIT .
      DATA DATE_FROM LIKE SY-DATUM.
      READ TABLE S_CHADT INDEX 1.
      LOOP AT IT_VBAP.
        AT NEW VBELN.
          MOVE IT_VBAP-VBELN TO TEMP_SO_VBELN.
          COLLECT TEMP_SO_VBELN.
        ENDAT.
      ENDLOOP.
      IF TEMP_SO_VBELN[] IS NOT INITIAL.
        SELECT OBJECTID AS VBELN FROM CDHDR
             INTO TABLE SO_VBELN
               FOR ALL ENTRIES IN TEMP_SO_VBELN
             WHERE  OBJECTCLAS EQ 'VERKBELEG'
             AND OBJECTID EQ TEMP_SO_VBELN-VBELN
             AND USERNAME IN S_CHABY
             AND UDATE IN S_CHADT.
      ENDIF.
      LOOP AT IT_LIPS INTO WA_LIPS.
        AT NEW VBELN.
          MOVE WA_LIPS-VBELN TO DL_VBELN.
          COLLECT DL_VBELN.
        ENDAT.
      ENDLOOP.
    * Changes in Sales Order.
      IF NOT  SO_VBELN[] IS INITIAL.
    * Get partner functions
        SELECT * INTO TABLE IT_TPART
          FROM TPART WHERE SPRAS EQ SY-LANGU.
        SELECT A~TABNAME A~FIELDNAME A~DATATYPE B~DDTEXT
           INTO CORRESPONDING FIELDS OF TABLE IT_FIELD
           FROM DD03L AS A INNER JOIN
                DD04T AS B
                ON A~ROLLNAME EQ B~ROLLNAME
                AND A~AS4LOCAL EQ B~AS4LOCAL
              WHERE ( A~TABNAME EQ 'VBAK'
                      OR A~TABNAME EQ 'VBAP'
                      OR A~TABNAME EQ 'VBEP'
                      OR A~TABNAME EQ 'VBPA'
                      OR A~TABNAME EQ 'VBUK'
                      OR A~TABNAME EQ 'VBKD' )
               AND  A~AS4LOCAL EQ 'A'
               AND A~AS4VERS EQ '0000'
               AND A~ROLLNAME NE SPACE
               AND B~DDLANGUAGE EQ SY-LANGU.
    * Preapare the exclusion table
        R_EXCL_FIELDS-OPTION = 'EQ'.
        R_EXCL_FIELDS-SIGN = 'I'.
        LOOP AT IT_FIELD WHERE DATATYPE EQ 'CURR'.
          R_EXCL_FIELDS-LOW = IT_FIELD-FIELDNAME.
          APPEND R_EXCL_FIELDS.
        ENDLOOP.
        R_EXCL_FIELDS-LOW = 'ARKTX'.
        APPEND R_EXCL_FIELDS.
        R_EXCL_FIELDS-LOW = 'LGORT'.
        APPEND R_EXCL_FIELDS.
        R_EXCL_FIELDS-LOW = 'TDDAT'.
        APPEND R_EXCL_FIELDS.
        R_EXCL_FIELDS-LOW = 'LDDAT'.
        APPEND R_EXCL_FIELDS.
        R_EXCL_FIELDS-LOW = 'MBDAT'.
        APPEND R_EXCL_FIELDS.
        R_EXCL_TABL-OPTION = 'EQ'.
        R_EXCL_TABL-SIGN = 'I'.
        R_EXCL_TABL-LOW = 'KONVC'.
        APPEND R_EXCL_TABL.
        R_EXCL_TABL-LOW = 'VBKD'.
        APPEND R_EXCL_TABL.
        LOOP AT SO_VBELN.
          REFRESH ITAB_CDHDR.
          DATE_FROM = S_CHADT-LOW.
          DATE_UNTIL = S_CHADT-HIGH.
          CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
            EXPORTING
              DATE_OF_CHANGE             = DATE_FROM
              OBJECTCLASS                = 'VERKBELEG'
              OBJECTID                   = SO_VBELN-VBELN
              TIME_OF_CHANGE             = TIME_UNTIL
              DATE_UNTIL                 = DATE_UNTIL
              USERNAME                   = ' '
            TABLES
              I_CDHDR                    = ITAB_CDHDR
            EXCEPTIONS
              NO_POSITION_FOUND          = 1
              WRONG_ACCESS_TO_ARCHIVE    = 2
              TIME_ZONE_CONVERSION_ERROR = 3
              OTHERS                     = 4.
          IF SY-SUBRC NE 0.
            CONTINUE.
          ENDIF.
          LOOP AT ITAB_CDHDR WHERE USERNAME IN S_CHABY.
            REFRESH IT_CDSHW.
            CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
              EXPORTING
                CHANGENUMBER            = ITAB_CDHDR-CHANGENR
              TABLES
                EDITPOS                 = IT_CDSHW
              EXCEPTIONS
                NO_POSITION_FOUND       = 1
                WRONG_ACCESS_TO_ARCHIVE = 2
                OTHERS                  = 3.
            IF SY-SUBRC EQ 0.
              PERFORM GET_ACTION .
            ENDIF.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    * Changes in Delivery
      IF NOT DL_VBELN[] IS INITIAL.
        REFRESH : IT_CDHDR , IT_CDPOS.
        SELECT  OBJECTCLAS OBJECTID CHANGENR USERNAME UDATE
               FROM CDHDR INTO CORRESPONDING FIELDS OF TABLE IT_CDHDR
             FOR ALL ENTRIES IN DL_VBELN
           WHERE  OBJECTCLAS EQ 'LIEFERUNG'
           AND OBJECTID EQ DL_VBELN-VBELN
           AND USERNAME IN S_CHABY
           AND UDATE IN S_CHADT
           AND CHANGE_IND EQ 'U'.
        LOOP AT IT_CDHDR.
          CONCATENATE SY-MANDT IT_CDHDR-OBJECTID
           INTO IT_CDHDR-TABKEY .
          CONDENSE  IT_CDHDR-TABKEY.
          MODIFY IT_CDHDR.
        ENDLOOP.
        IF NOT IT_CDHDR[] IS INITIAL.
          SELECT  * INTO TABLE IT_CDPOS FROM CDPOS
               FOR ALL ENTRIES IN IT_CDHDR
             WHERE  OBJECTCLAS EQ IT_CDHDR-OBJECTCLAS
             AND OBJECTID EQ IT_CDHDR-OBJECTID
             AND CHANGENR EQ IT_CDHDR-CHANGENR
             AND TABNAME EQ 'LIKP'
             AND TABKEY EQ IT_CDHDR-TABKEY
             AND FNAME IN ('WADAT','LFDAT','ROUTE','VSBED')
             AND CHNGIND EQ 'U' .
          LOOP AT IT_CDPOS .
            CLEAR  IT_DL_CHG-FLAG_RED.
            CASE IT_CDPOS-FNAME.
              WHEN 'WADAT'.
                MOVE 'Goods issue date changed' TO IT_DL_CHG-ACTION.
              WHEN 'LFDAT'.
                MOVE 'Delivery date changed' TO IT_DL_CHG-ACTION.
                MOVE 'X'  TO IT_DL_CHG-FLAG_RED.
              WHEN 'ROUTE'.
                MOVE 'Route Changed' TO IT_DL_CHG-ACTION.
              WHEN 'VSBED'.
                MOVE 'Shipping Condition Changed' TO IT_DL_CHG-ACTION.
              WHEN OTHERS.
            ENDCASE.
            AT NEW CHANGENR .
              READ TABLE IT_CDHDR WITH KEY OBJECTCLAS = IT_CDPOS-OBJECTCLAS
                                           OBJECTID = IT_CDPOS-OBJECTID
                                           CHANGENR = IT_CDPOS-CHANGENR
                                           BINARY SEARCH.
              MOVE IT_CDHDR-USERNAME TO  IT_DL_CHG-ERNAM.
              WRITE IT_CDHDR-UDATE TO  IT_DL_CHG-ERDAT.
            ENDAT.
            IT_DL_CHG-COUNTER = IT_DL_CHG-COUNTER + 1.
            MOVE IT_CDPOS-OBJECTID TO IT_DL_CHG-VBELN.
            MOVE IT_CDPOS-VALUE_OLD TO IT_DL_CHG-OLD_VAL.
            MOVE IT_CDPOS-VALUE_NEW TO IT_DL_CHG-NEW_VAL.
            INSERT TABLE IT_DL_CHG.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_CHANGES
    Cheers
    VJ

  • I was setting up an iPad Mini and it updated my iMac's OS. It reverted to 2011 and I have lost emails, desktop data and Adobe won't let me in to software. Help!

    I was setting up an iPad Mini and it updated my iMac's OS. It reverted to 2011 and I have lost emails, desktop data and Adobe won't let me in to software. Help!

    The iPad was plugged into the iMac to transfer apps etc and asked to update the macs OS. The result is that the last 12 months of emails have gone ( emails not working) as have whatever files were on the desktop. The calendar has also reverted to 2011.
    Worse still is adobe software I use for work won't let me open.
    Any ideas?

  • HT1923 Hi, I have a iPod touch 4th generation and I does not show in iTunes. It comes up as charging when it is plugged into the computer but just not in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Hi, I have a iPod touch 4th generation. It comes up as charging when it is plugged into the computer but it does not show in iTunes. I have everything up to date and have restarted both computer and iPod. Help please?

    Try here  >   - http://support.apple.com/kb/TS1369.

  • How can we delete SID table data and Text table data

    Hi,
    How can we delete SID table data and Text table data of any
    InfoObject.

    Hi,
    Go to transaction SE14, give the technical name if the table:
    /BIC/T<InfoObject Name>   for Text Table
    /BIC/S<InfoObject Name>  for SID Table
    Select "Table" in the given 4 options below  &  hit Edit button.
    in the next screen select "Direct"
    & also select "detele data" radio button.
    & hit  "Activate & adjust database".
    this will delete the complete data from the tables.
    Note: before deleting the SID's make sure of the consequences & after effects.
    Also the SID gets generated the next time you load master data/transaction data only for those records which were loaded..
    Regards,
    Iliyas

  • Since you don't allow emails any more – I suspect because of the numerous complaints with your service and the way you treat people that you don't want documented, I am calling and I want this call recorded for future reference. I have been a long time fa

    Since you don’t allow emails any more – I suspect because of the numerous complaints with your service and the way you treat people that you don’t want documented, I am calling and I want this call recorded for future reference.
    I have been a long time faithful customer of vzw and although the past year I have been late on payments many times and really couldn’t afford your exorbitant prices for services lots of other companies offer sometimes three times cheaper than what you charge, I have hung in there trying my best to meet my obligations.
    This month has been no exception. You don’t know the background; the whole story of people’s lives. I know you could care less because all you care about is the profit-the money that comes in.
    I was told when I agreed to pay my bill on the third per the recorded message that I had 14 days to pay…you cut me off anyway. The phones are not the tissue; your suspending my service means I cannot work. I may lose my job…how do you justify that? In any case? The least you could do would be to keep 4986 on and cut the phones off. But no. You refuse to compromise and meet the basic needs of your customer. What does that say about your company? I tried to call back on three separate occasions to tell you I couldn’t pay because of unexpected expenses but couldn’t get out of the automated system…sadly couldn’t get to a real person which also speaks volumes to me.
    All this tells me this is a company I don’t wish to be affiliated with any more. As soon as I can, I will discontinue service with you…I know you could care less. I will honor the remaining portion of the contract but that’s it. You don’t deserve my business. I am a good, hardworking person who, at the sacrifice of myself and my needs, always pays her bills…albeit late at times. I realize others tell you stories and lies to justify themselves. That’s not me. If you knew what I had been through the last 7 yrs you would marvel that I am  still on my feet…don’t judge too quickly. You could be wrong…and in my eyes you are by doing this to me.
    God will see us through this extremely scary time of that I have no doubt. No thanks to your company and lack of understanding and mercy. I am doing the best I can. Sadly you are not.
    See I have choices. MANY choices of providers for services you offer. I don’t have to be treated like this. I don’t have to succumb to your coldness and callousness. I intend to choose better (and cheaper). If your company doesn’t get the “people factor” back you will be sorry.

    Problem here is you admit you cannot afford the service.
    And you want to blame Verizon for losing a job because you have no cell phone.
    If your job depends on that phone I would pay it on time every time if you need a job to pay your bill.
    No other service is going to treat you any different. And if you cannot afford Verizon's monthly invoice how are you going to afford new devices, activation fees, possible security deposits on any other cellular carrier? You can't.
    Also if you made an arraignment to pay and then decide you cannot do so, why should Verizon extend you service or credit, or why is it you want to use the service and data and not pay for it as agreed.
    Get a prepay phone. Its evident the cost is too high for you to afford on post pay.
    Good Luck

  • How to compare two tables data...need sql report or utility to find differe

    Hi,
    We have a requirement where we are asked to find data differences between two tables and one of the tables reside on remote database. The database version is same ( 10g ) and datatypes for the tables are similar.
    The client is looking for a sql report or kind of utility to display the data differences for each column ( if possible count differences ) with some meaningful error messages.
    Could anyone let me know the best possible way of doing it..?
    Thanks
    Hitarth

    Hi,
    I found something for tables comparison but getting one error...can you check this please and let me know what is wrong
    Here is the function:
    CREATE OR REPLACE FUNCTION compare_query_results (
    p_query1 IN VARCHAR2
    , p_query2 IN VARCHAR2
    , p_raise_error_if_not_equal IN BOOLEAN DEFAULT FALSE
    , p_raise_error_if_no_rows IN BOOLEAN DEFAULT FALSE
    RETURN NUMBER
    IS
    -- Constants
    c_query_results_equal CONSTANT PLS_INTEGER := 0;
    c_query_results_not_equal CONSTANT PLS_INTEGER := 1;
    oracr CONSTANT VARCHAR2 (1) := CHR (10);
    -- Variable Declaration
    v_sql_stmt VARCHAR2 (32767);
    v_record_count PLS_INTEGER;
    v_return_code PLS_INTEGER;
    v_record DUAL.dummy%TYPE;
    v_result_set_has_rows BOOLEAN;
    -- Ref Cursors
    v_cursor sys_refcursor;
    -- Custom Defined-Exceptions
    result_sets_do_not_match EXCEPTION;
    query_returns_no_rows EXCEPTION;
    BEGIN
    -- Get the count of differing records between p_query1 and p_query2
    dbms_output.put_line('Start-1');
    v_sql_stmt :=
    ' (SELECT /*+ materialize */'
    || SUBSTR (p_query1, INSTR (UPPER (p_query1)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    , (SELECT /*+ materialize */'
    || SUBSTR (p_query2, INSTR (UPPER (p_query2)
    , 'SELECT'
    , 1
    , 1
    ) + 6)
    || ')
    SELECT ''X''
    FROM (
    (SELECT * FROM test1 MINUS SELECT * FROM test2)
    UNION ALL
    (SELECT * FROM test2 MINUS SELECT * FROM test1)
    dbms_output.put_line('Start-2');
    OPEN v_cursor
    FOR v_sql_stmt;
    dbms_output.put_line('Start-3');
    FETCH v_cursor
    INTO v_record;
    dbms_output.put_line('Start-4');
    v_result_set_has_rows := v_cursor%FOUND;
    dbms_output.put_line('Start-5');
    CLOSE v_cursor;
    dbms_output.put_line('Start-6');
    -- If there are rows - the result sets do NOT match...
    IF v_result_set_has_rows
    THEN
    v_return_code := c_query_results_not_equal;
    IF p_raise_error_if_not_equal
    THEN
    RAISE result_sets_do_not_match;
    END IF;
    -- If there are no rows - the result sets do match...
    ELSIF NOT v_result_set_has_rows
    THEN
    IF p_raise_error_if_no_rows
    THEN
    -- Check to make sure that the queries contain rows if desired...
    v_sql_stmt := 'SELECT ''X''
    FROM (' || oracr || p_query1 || oracr || ')';
    OPEN v_cursor
    FOR v_sql_stmt;
    FETCH v_cursor
    INTO v_record;
    IF v_cursor%NOTFOUND
    THEN
    CLOSE v_cursor;
    RAISE query_returns_no_rows;
    END IF;
    CLOSE v_cursor;
    END IF;
    v_return_code := c_query_results_equal;
    END IF;
    RETURN v_return_code;
    EXCEPTION
    WHEN result_sets_do_not_match
    THEN
    raise_application_error (-20101, 'The Queries'' result sets do NOT match. Error returned
    as requested.');
    WHEN query_returns_no_rows
    THEN
    raise_application_error (-20102, 'The Queries'' result sets match, however they contain no
    rows. Error returned as requested.');
    WHEN OTHERS
    THEN
    -- Raise the error
    raise_application_error (-20103
    , 'There is a syntax or semantical error in one or both queries
    preventing comparison.'
    || oracr
    || 'Error Stack :'
    || oracr
    || DBMS_UTILITY.format_error_stack ()
    || oracr
    || 'Error_Backtrace:'
    || oracr
    || DBMS_UTILITY.format_error_backtrace ());
    END compare_query_results;
    I have created two tables ( test1 and test2 ) with few columns and with the same datatypes and executed the above function...I am getting error as folliowing:
    DECLARE
    ERROR at line 1:
    ORA-20103: There is a syntax or semantical error in one or both queries
    preventing comparison.
    Error Stack :
    ORA-00900: invalid SQL statement
    Error_Backtrace:
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 53
    ORA-06512: at "ORAOWNER.COMPARE_QUERY_RESULTS", line 121
    ORA-06512: at line 12
    Could someone please help me fixing this error..It would be really appreciated
    Thanks
    Hitarth

  • I have bought a new pc, and i want to move adobe lightroom frome my old computer to my new comuter.

    I have bought a new computer and I want to move adobe lightroom frome my old computer to my new computer, how do I do this?

    thank you
    Date: Tue, 18 Jun 2013 12:14:18 -0700
    From: [email protected]
    To: [email protected]
    Subject: I have bought a new pc, and i want to move adobe lightroom frome my old computer to my new comuter.
        Re: I have bought a new pc, and i want to move adobe lightroom frome my old computer to my new comuter.
        created by Tom Hogarty in Photoshop General Discussion - View the full discussion
    This is a fairly in-depth tutorial on moving from one computer to another.(I recommend Option 1)
    http://www.lightroomqueen.com/2009/02/28/how-do-i-move-lightroom-to-a- new-computer/
    Also, there's no need to find the original disk for installation.  Just download the latest update of your purchased version from here: http://www.adobe.com/downloads/updates/ and user your original serial number.
    Regards,
    Tom Hogarty
    Adobe Systems
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5422074#5422074
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5422074#5422074
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5422074#5422074. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop General Discussion by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • I have a new ipad air and it has this weird function where i have to double touch everything how can i get this to stop?

    I have a new ipad air and it has this weird function where i have to double touch everything how can i get this to stop?

    Settings > General > Accessibility > VoiceOver:  OFF
    On your way, tap once to select an item, double-tap to activate an item, swipe three fingers to scroll.

  • I have lost my I phone, and I want to disable it. I couldn't find it through "I cloud" or "find my iphone"!! Can I disable it by using the serial No. or IMEI ? How?

    I have lost my I phone, and I want to disable it.
    I couldn't find it through "I cloud" or "find my iphone"!!
    Can I disable my lost I phone by using the serial No. or IMEI ? How?

    The only way to locate/disable/erase any lost/stolen iPhone/iPod Touch is through Find My Phone or a similar app. However, this requires that Find My Phone be setup/activated, on your phone, before it was lost/stolen. You would then login at iCloud.com & try to locate it. This requires the phone be turned on & have an Internet connection. There is no other way to locate a lost/stolen iPhone. Apple can't/won't help you, nor will your carrier. Report the loss to the Police, your carrier & Insurance company. Change all of your passwords.
    If your carrier offers Blacklisting & they Blacklist the phone, it will be unusable as a phone.
    If locked with a passcode, all a thief or whoever finds it has to do is force the phone into recovery mode & restore it. While this deletes all data on the phone, it also removes the passcode so the phone can then be used as a phone or touch.

Maybe you are looking for

  • How to access a file via Applet and JavaScript

    I want to copy one file on the client machine from one place to another place from a Java Bean. To do this I created an applet and a Java Bean as follows: import java.applet.*; public class FileUtils extends Applet {     public void copyFile(String s

  • Changing default color for arrows from the Shapes palette.

    I'm building a tutorial website for how to buy kitchens from my cabinetshop. I use a lot of arrow type lines from the Shapes Palette. After I create the arrow-line I have to re-color it to red with the Graphics Inspector. Is there a way to set red as

  • Mac book won't boot

    My Mac book pro makes start up noise, then goes to apple screen and thinking icon but won't go any further! Help

  • URL changing after been redirected to another component ....

    Hi, I have modified to display additional page for every authenticated user before displaying the portal home page .. here is the code .. IPortalComponentURI uri = request.createPortalComponentURI(); uri.setContextName("com.sap.portal.navigation.mast

  • Adf rowKey question

    Hi all, I have a search (data)page and a results (data)page as follows: [SearchDataPage] ----execute------> [ResultsDataPage] The search data page contains a input form and is in 'Find mode', it also contains a execute button. When I fill in some (se