• caramelkaps (4/10/2012)


    Thanks...the example u provided works in oracle.

    But when i try to exceute this query to get values from sql server table it fails and gives an error date format not recognized.

    Query :

    select to_char(source_id,'yyyy-mm-dd hh24:mi:ss:ff6') from xyz@dblink_test;--this fails to execute

    Paul mentioned the datatype issue for timestamp vs date, and i will again:

    what is the datatype in oracle for the column source_id

    if source_id is not timestamp, you cannot use the format mask featuring ff6, because that level of preceision requires the timestamp datatype , not date; maybe you can convert date to timestamp before you try to TO_CHAR it?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!