Data compare

Hi
I would like to run below query on all tables, however it doesnt work on clob and long datatypes
select * from owner.table_name
minus
select * from owner.table_name@remote_db;
from dba_tables
where owner in ( '....');
ORA-00932: inconsistent datatypes: expected - got CLOB
How can I compare the data of clob and long datatypes using dblink ?

you can not pass clob data over a dblink. you can use plsql to help if it is necessary. you can create a package and describe a cursor in it, then write a function which will return next 4000 char of clob and you can get all clob data using this. why do you want to compare clobs ? what is your purpose, what data is in clob ?

Similar Messages

  • SQL Server Data Compare doesn't retrieve table list

    I'm trying to do a data compare in Visual Studio 2013.  I have chosen my source and targets and successfully tested the connection to each of them in the connections dialog. 
    When I choose next, there's a few seconds delay as though the compare tool is checking with the source and target and then it shows a dialog with what to compare.  There is a checkbox next to Tables and next to Views.  Those are the only two options
    shown. 
    What should be in this dialog, left of Tables and Views, is an arrow to expand them and show the list of tables and views in the source database.  The arrow is missing and I cannot expand any list of tables or views.  There's just nothing shown
    to compare.
    When I click Next again, the compare appears to run but when complete it reports that zero tables or views were compared - under the circumstances this is as expected because the previous dialog did not allow me to check any tables to compare.
    Why am I not getting the arrow to expand the list of tables?  What's wrong with Data Compare?
    Thanks,
    Dale

    Hi Dale,
    >>In your image you show a primary key value in comparison key but my tables did not have a primary key assigned
    >>Is the comparison key requirement by design? 
    I repro it, I get the same issue as yours, if no key, we couldn't compare the tables.
    Like the document here:
    https://msdn.microsoft.com/en-us/library/dn266029%28v=vs.103%29.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/aa833428(v=vs.100).aspx
    Requirements
    When you compare data in a table or view, the table or view in the source database must share several attributes with a table or view in the target database. Tables and views that do not meet the following criteria are not compared and do not appear
    on the second page of the      New Data Comparison   wizard:
    Tables must have matching column names that have compatible data types.
    Names of tables, views, and owners are case-sensitive.
    Tables must have the same primary key, unique index, or unique constraint.
    Views must have the same unique, clustered index.
    You can compare a table with a view only if they have the same name.
    Each object has a key or an index that determines the other objects to which it corresponds. However, each table or view can have more than one primary key, unique index, or unique constraint. Therefore, you might want to specify which key, index,
    or constraint to use.
    As my understanding, it would have the specific requirements.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • VS2012 SQL Data compare

    Dear Sirs,
    Concerning the tools comparing data in VS2012(SQL - Data compare ) it is possible to run this comparison by timer  for example :" each two minutes comparing the database if not equal update the target".
    Best Regards
    Nicolas Chami

    Hi Nicolas. It sounds like what you want is to enable replication on your database.
    Here is the main help page
    for replication. This should have the right links to get you started. Regards,
    Kevin

  • JSTL Date Compare Question

    I am using JSTL to parse an xml feed (news articles) and need to restrict the articles I get back in the xml to todays date. On another page I am working on I have to restrict the articles to todays date - 7 days (one week). I understand how to parse and format dates with jstl, but am stuck on doing date compares like this. The date I have to restrict on in the xml feed is called <pubDate>. If anyone could help me out with using JSTL to parse and handle these date ranges that would be great. Here is a portion of the xml I am dealing with:
    - <!-- Item 1 of todays_free_feature
    -->
    - <item>
    <title>Building an Online Library</title>
    <link>http://online.wsj.com/public/article/0,,SB113111987803688478-VNpw62xi_JA4avE8cxOZf0pf_nM_20061109,00.html?mod=rss_free</link>
    <description>Liz Ridolfo is one of several foot soldiers engaged in an ambitious effort to digitize the world's libraries, one volume at a time.</description>
    <pubDate>Tue, 08 Nov 2005 20:22:00 EST</pubDate>
    </item>
    - <!-- Item 2 of todays_free_feature
    -->
    - <item>
    <title>Guest-Worker Proposals Prove Divisive</title>
    <link>http://online.wsj.com/public/article/0,,SB113149831207391770-V6OGF4bCCsOhJlj0ZAPd1jKIMUg_20061109,00.html?mod=rss_free</link>
    <description>Bush is proposing a guest worker program that business loves and the Senate seems eager to pass, but the issue splits Republicans eager to help business from those concerned about border security, job losses and the nation's identity.</description>
    <pubDate>Tue, 08 Nov 2005 23:02:00 EST</pubDate>
    </item>
    - <!-- Item 3 of todays_free_feature
    -->
    - <item>
    <title>Changing Times at the Fed</title>
    <link>http://online.wsj.com/public/article/0,,SB113136589127989951-biMkDwuEVMUvrmqav2YE8OCApTk_20061109,00.html?mod=rss_free</link>
    <description>Alan Greenspan will soon step down as Federal Reserve chairman and hand the reins to Ben Bernanke. But that's not the only change likely to be in store at the U.S. central bank. William Polley and Tim Duy to explore what the future might hold for the seat of U.S. monetary policy.</description>
    <pubDate>Tue, 08 Nov 2005 20:46:00 EST</pubDate>
    </item>
    - <!-- Item 4 of todays_free_feature
    -->
    - <item>
    <title>Protecting Ideas Is Crucial for U.S. Business</title>
    <link>http://online.wsj.com/public/article/0,,SB113149228287891613-mKwE4jbbsNWEvRsGvadhQNc6tGI_20061109,00.html?mod=rss_free</link>
    <description>Intellectual property is one of the thorniest problems facing modern capitalism. The challenge is to protect creators' right to profit while still ensuring that the benefits of their creations are widely spread.</description>
    <pubDate>Tue, 08 Nov 2005 22:50:00 EST</pubDate>
    </item>

    I had problems following your advice, hence I used a different formatter
    <fmt:formatDate var="nextRunStr" value="${reminder.nextRunDateTime}" pattern="yyyyMMddHHmmss"/>
                                  <fmt:formatDate var="nowStr" value="${now}" pattern="yyyyMMddHHmmss"/>
    and then
    ${nextRunStr ge nowStr}"
    seems to work OK.

  • Where's Data Compare?

    I've been away from the Microsoft stack for a few years doing Java but I have kept up my MSDN subscription and still have all the tools. 
    Somewhere, while I wasn't looking, it appears that Data Dude (the Database Pro version/tools in Visual Studio, has disappeared.  Now I find myself trying to do a data compare between two tables in the same database, even tried duplicating the problem
    across two different databases, and I can't get a data compare to work.
    I downloaded the SQL Server Data Tools - both editions: SQL Server and Visual Studio - and I find the data compare on the Visual Studio version - but not at all like the current VS2013 blogs and instructions present it.  I was able to add the two connections
    I need and run the compare but there are no results.  The compare window says there were 0 tables or views compared.
    What gives?  What do I need to do to get a data compare, either in two separate databases or two tables in the same database, to work?  Please Help!

    Thanks, Joe.  I found the menu item; it's not where it was in earlier versions where there was a Data menu.  You're right about the same-DB compare.  I had to do just as you said, create a new DB and copy one table there.
    The other change between the early, red-gate-based, data compare in Visual Studio is that now you must have a primary key defined on both tables.  My tables were throwaway tables just for purposes of this test and didn't have primary keys assigned. 
    I didn't get a compare until I added the primary keys.
    Right, you must have a primary key so that Data Compare knows which rows to compare. If you don't have a primary key the table name will not come up in the list of tables available for comparison.

  • Oracle.jbo.domain.Number / Date comparable ?

    Hello,
    I'd like to know whether there was a plan to make the oracle.jbo.domain.Number and oracle.jbo.domain.Date classes implement the Comparable interface?
    That would save some unnecessary wrapping code...
    Thanks in advance,
    Remi

    I just want to push this Idea, since it is hard to understand, why such a simple interface is not implemented for such a basic class. It would make a lot of things much easier.

  • Error during date comparing

    Hi , i have situation , where i have to find a date between two dates
    i used below filter condition, but i get error
    (TO_DATE(PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH, 'DD-MON-YYYY') BETWEEN
    TO_DATE('01-MAR-2012', 'DD-MON-YYYY') AND
    TO_DATE('31-MAR-2012', 'DD-MON-YYYY')
    Error :-
    ORA-12801: error signaled in parallel query server P000
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    ORA-02063: preceding 2 lines from EDW_REP_DBLINK
    12801. 00000 - "error signaled in parallel query server %s"
    *Cause:    A parallel query server reached an exception condition.
    *Action:   Check the following error message for the cause, and consult
    your error manual for the appropriate action.
    *Comment:  This error can be turned off with event 10397, in which
    case the server's actual error is signaled instead.
    is their any error in code or this error is db level

    Hi,
    916710 wrote:
    hi ,
    here are the details
    CURRENT_MONTH is date datatype in PLAYER_MONTHLY_SUMMARY table TO_DATE, as the name implies, converts something TO a DATE . If current_month is already a DATE, you don't need to convert it to a date.
    Besides, the 1st argument to TO_DATE is supposed to be a VARCHAR2. Don't use a DATE where a VARCHAR2 is expected.
    and date range is from next_run_date where my next_strt_date and next_end_date both are date datatype
    instead of this below query
    (TO_DATE(PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH, 'DD-MON-YYYY') BETWEEN
    TO_DATE('01-MAR-2012', 'DD-MON-YYYY') AND
    TO_DATE('31-MAR-2012', 'DD-MON-YYYY')
    if i try below one then it worked
    PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH BETWEEN
    TO_DATE('01-MAR-2012', 'DD-MON-YYYY') AND
    TO_DATE('31-MAR-2012', 'DD-MON-YYYY')
    is this approach is rightYes, that's comparing a DATE (current_month) to other DATEs (the results of TO_DATE).
    Remember that all DATEs in Oracle include hours, minutes and seconds. If the hours, minutes and seconds of current_month are always 00:00:00 (for example, if current_month is always populated with TRUNC (some_date, 'MONTH')) then the comparison above is okay. But if current_month can be something like 6:52;31 on March 31, 2012, then it will fail the condition, becuase the upper end of the range is
    TO_DATE('31-MAR-2012', 'DD-MON-YYYY') which is 00:00:00 on March 31, 2012. To include current_month that is any time of day on March 31, you'd have to do something slightly diferent, such as
    PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH  BETWEEN TO_DATE ( '01-MAR-2012'     -- Default time, 00:00:00, is okay here
                                                    , 'DD-MON-YYYY'
                              AND     TO_DATE ( '31-MAR-2012 23:59:59'
                                                    , 'DD-MON-YYYY hh24:mi:ss'
                                        ) or
         PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH  >= TO_DATE ( '01-MAR-2012', 'DD-MON-YYYY')
    AND  PLAYER_MONTHLY_SUMMARY.CURRENT_MONTH  <  TO_DATE ( '31-MAR-2012', 'DD-MON-YYYY') + 1

  • Best Practice Question for Date Compares

    Hello,
    I'm far from an expert on Oracle and PL/SQL, so I may have this all wrong.  I'm working on some selection scripts, and the guy that wrote these before me likes to convert parts of dates to numbers in order to do a compare.  It seems to me a trunc(date, part) would be much more efficient.  Can anyone confirm my thoughts here?
    I'm seeing this a lot:
    AND    TO_NUMBER (TO_CHAR (scheduleddate, 'YYYY')) = TO_NUMBER (TO_CHAR (SYSDATE - 1, 'YYYY'))
    Seems to me that I'd be better off just doing:
    trunc(scheduleddate, 'YEAR') = trunc(SysDate, 'YEAR').
    Does that make sense?
    Thanks!
    Chad

    CSchrieber wrote:
    Hello,
    I'm far from an expert on Oracle and PL/SQL, so I may have this all wrong.  I'm working on some selection scripts, and the guy that wrote these before me likes to convert parts of dates to numbers in order to do a compare.  It seems to me a trunc(date, part) would be much more efficient.  Can anyone confirm my thoughts here?
    I'm seeing this a lot:
    AND    TO_NUMBER (TO_CHAR (scheduleddate, 'YYYY')) = TO_NUMBER (TO_CHAR (SYSDATE - 1, 'YYYY'))
    Seems to me that I'd be better off just doing:
    trunc(scheduleddate, 'YEAR') = trunc(SysDate, 'YEAR').
    Does that make sense?
    Thanks!
    Chad
    however , you might want to play around with it a bit to confirm you get the behavior you want in your context.  I've not had much reason to use trunc, and in testing a few things just now to reply to admin1, I got some results that surprised me.  Another little learning project for me now.
    But I stand behind the essence of my original reply.  The guy that wrote your original code was jumping through too many hoops (transform functions).

  • Simple quesstion - Date compare

    Hi, I would like to ask how to compare a date with current date in Java.
    I tried date.equals() method, but it compare the date and time. However I want to compare the date only. (without time). Thank you very much!

    There are many ways to approach this problem. Two off the top of my head:
    (1) Use java.text.SimpleDateFormat and put both dates into the same format. Make sure your format only includes the pieces you care about (MM/dd/yyyy for example). Then do a String compare (strObjA.equals(strObjB)) on the resultant output.
    (2) Create a java.util.GregorianCalendar object using the times from the date objects. Then use various accessor methods on that object to retrieve the year, month, and day and compare each.
    Both of these classes are documented in the java standard APIs.
    Hope this helps.

  • Read Year from System Date & Compare - Assistance required

    Hi All,
    I am trying to read only the year part from the system date & then checking if any entry exists in EKKO table (EKKO-BEDAT) for the year. I think i am making an error in my data declaration for V_YEAR & in my select statement (EKKO~BEDAT LIKE V_YEAR), not sure how to compare only the year part, can someone help.
    DATA:
        V_EBELN TYPE EKPO-EBELN,
        V_YEAR  TYPE SY-DATUM.
    CLEAR: V_EBELN, V_YEAR.
    *Read year from system date
    V_YEAR = SY-DATUM+0(4).
    CONCATENATE '%' '%' '%' '%' V_YEAR INTO V_YEAR.
    *Select section
    SELECT SINGLE EKPO~EBELN INTO V_EBELN
    FROM EKPO
      INNER JOIN EKKO
        ON EKPOEBELN = EKKOEBELN
      INNER JOIN LFM1
        ON EKKOLIFNR = LFM1LIFNR
       WHERE EKKO~LIFNR = LFM1-LIFNR
         AND EKKO~BEDAT LIKE V_YEAR
         AND EKPO~LOEKZ = SPACE.

    Hi Sougata,
    Thanks for the inputs, but it is not working:
    Move:      sy-datum(4) to v_begda, -> This reads the system year 2008
            '0101'     to v_begda,  -> This changes 2008 to 0101
            sy-datum(4) to v_endda, -> This reads system year i.e. 2008
            '1231'     to v_endda. -> This changes 2008 to 1231
    Also in the select statement
    AND EKKO~BEDAT between v_begda and v_endda 
    This would not work, as EKKO-BEDAT is in year month date format.
    So can you please clarify why we are assigining 0101 & 1231 & also how we can compare only the year in EKKO-BEDAT with System Year
    Update
    I tried to
    concatenate '0101 into v_begda.
    concatenate '1231' into v_endda.
    but system prompts "charlike-field" expected after "'0101'"
    Can you please advice?
    Edited by: Vivek on Jan 5, 2008 7:59 PM

  • ALE data compare

    ALE is set up between local and global box to send Employee data.
    Users found out some discrepancies between the data and now we want to verify data between these 2 systems is in sync….
    Any suggestion how to address above task…

    Thanks for suggestions...
    Now challenge is...one system is global and another local.
    Global is data source...so we will like to compare data from Global to local..
    From Global data, we just want to compare local data...
    Example: global is having World Wide employee data and we will like to compare only US employee data..
    How to do that..

  • Is there any in-built function for date compare?

    I need function which compare dates?

    Hi,
    You can simply use > , <,etc.,
    Check this sample code.
    data : d1 type RM06B-EEIND ,
           d2 type sy-datum.
    d1 = sy-datum.
           CALL FUNCTION 'DATE_IN_FUTURE'
             EXPORTING
               anzahl_tage                   = '-7'
               import_datum                  =  d1
            IMPORTING
              EXPORT_DATUM_EXT_FORMAT       =  d2
              EXPORT_DATUM_INT_FORMAT       =  d2
    if d1 < d2.
    write 'h'.
    endif.

  • Alert on Today's Data Compared with Previous Day Data

    Hi All,
    I've a report with multiple tabs having data like,
    Tab:1                                   Tab:2                                 Tab:3                          Tab:4
    Franchise: ABC                   Franchise                          Franchise                    Same as Tab:3
    Start Date:                           Start Date                          Month
    Operator: XYZ                     Operator                            Operator
    Incoming Node:N01            Outgoing Node                  Incoming Node
    Incoming Path:P01             Outgoing Path                    Incoming Path
    Incoming Count:2                Outgoing Count                 Incoming Count
    Incoming Mins: 10.63          Outgoing Mins                   Incoming Mins
    My requirement here is, I've want an alert on Percentage of Mins comparing its data with the previous day(Month for Tab 3 & 4) mins data. For now I've done this by creating a variable(with Relative Value Function) that stores the previous day or month's mins and stored the difference of these two data into another variable as Variation. I've put a percentage on the Variation variable and put a alert on it. It went well till here but, my requirement also has graphical alert on percentage. I tried adding the Variation variable and percentage and all available measures. But an error showed up with every try saying "Error in dataset values :#COMPUTATION"
    Is there any other to do this report?
    Note: I'm using WebI Rich Client v4.1 SP1

    I tried using Franchise(Dim) and with that i've used Incoming Count, Incoming Mins, Variation separately. But nothing worked.

  • Date compare with system date

    Given date time is in yyyyMMddHHmmss format, want to compare with system date time.
    ie given date time is greater than zero then go inside if block otherwise else block.

    I am using below code which always greater than zero. But I want to use compare to method to compare given date with system date and goto if or else condition:
    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
             String delaytimeFormat = sdf.format(new Date("10/10/2009"));    
             System.out.println("delaytimeFormat: "+delaytimeFormat);
             long timeDiff = Long.parseLong(delaytimeFormat) - System.currentTimeMillis(); 
             System.out.println("timeDiff->"+timeDiff);
             String newCallbackUrl = null;
            if(timeDiff > 0){
                 s = s+" new URL"+"test" ;
                 System.out.println("if:->"+s);
            else{
                 System.out.println("else");
            }

  • Webi Report Data compare between two columns

    There is two different queries in Webi Report BI 4.1
    Query 1 - Name_1 == 100 records
    Query 2 - Name_2 == 75 records
    On the report need to compare the data between Name_1 and Name_2.
    Need report level flag as a second column
    name_1 = name_2 = Y
    name_1 <> name_2 = N
    One the report there is only two columns Name_1 Flag(Y/N)
    1. If statement is not working at all in this scenario
    2. Merge dimension is not useful since I need to treat these columns separately on the report.

    Hi Suri,
    As the objects belong to two different queries, the comparison might not work as they are not merged and incompatible.
    You can try creating a seperate query and can use subquery in it.
    For example:
    SELECT NAME_1 FROM QUERY_1
    WHERE
    NAME_1 NOT IN (SELECT NAME_1 FROM QUERY_2)
    This will display the names which are not common.
    Hope it will help.
    Regards,
    Yuvraj

Maybe you are looking for

  • I have no sound on youtube?

    the sound indicator has an x  when viewing youtube next to it and there is no sound using both safari and chrome. I did upgrade flash player

  • Disappointing WRT610N Gigabit Ethernet speed

    I'm very disappointed with the wired Gigabit speed on this WRT610N router. I've got three high end Gigabit capable computers connected to the router via the wired interfaces and the best speed I can get is from any system to another is 38% of Gigabit

  • Business area

    Hi, I have a requirement. I have one plant created for central warehouse and 4 other plants as my retail outlets. It has been decided to have a separate Business Area for each of these plants to track the business per business area. However, there is

  • Invidia Tesla support in Lightroom?

    Does LR 2.1 take advantage of Invidia's Telsa GPU? Tesla allows offloading computations to the GPU. If yes, has anyone tried a Tesla graphics card?

  • Popup in a tab

    Is it possible to attach a popup to a tab in a TabbedPane in java5 (without embbeding a component in the tab, that is a java 6 feature)?