Export of data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DMina@laiki.com

    Export of data

    Hello people!

    I am a bit puzzled here so any help will be much appreciated.
    Here is the situation:
    I have a query which selects all the data based on a date column. I
    need all the data which are
    older than 130 days:

    select count(*) from mytable where insert_date <= sysdate - 130

    Currently the above query gives me a number of 31614 rows

    The above data will be candidate for deletion. Before I delete I would
    like to export this data.
    Here is my parameter file:

    userid=myuser/myuser@mydb
    file=myfile.dmp
    buffer=100000
    log=myfile.log
    tables=(
    mytable
    )
    GRANTS=y
    INDEXES=y
    ROWS=y
    CONSTRAINTS=n
    QUERY='where insert_date<=sy sdate - 130'

    The export shows me that only 598 rows are exported? Shouldn't I get
    31614 rows? Am i missing something here?

    Thanks

  • Bobiander

    #2
    Re: Export of data

    Hi,
    I use this parameter but not with single quote here is my example:

    QUERY=" where trunc(mvvalor) in (to_date('06.01 .2005',
    'dd.mm.yyyy'),t o_date('11.01.2 005', 'dd.mm.yyyy'),t o_date('13.01.2 005',
    'dd.mm.yyyy'),t o_date('18.01.2 005', 'dd.mm.yyyy'))"

    this export works here ...

    Comment

    • DMina@laiki.com

      #3
      Re: Export of data

      Hi and thanks for the reply,

      I have changed the single quotes to double quotes but still have the
      same problem.

      any other ideas?


      Bobiander wrote:
      Hi,
      I use this parameter but not with single quote here is my example:
      >
      QUERY=" where trunc(mvvalor) in (to_date('06.01 .2005',
      'dd.mm.yyyy'),t o_date('11.01.2 005',
      'dd.mm.yyyy'),t o_date('13.01.2 005',
      'dd.mm.yyyy'),t o_date('18.01.2 005', 'dd.mm.yyyy'))"
      >
      this export works here ...

      Comment

      • Bobiander

        #4
        Re: Export of data

        What is format of insert_date column , may be you must
        trunc(insert_da te) in where clause , also in my example I have a space
        before WHERE , I remembrer that I try few times , before find what I am
        looking for ..

        trunc(insert_da te) >= trunc(sysdate)

        ....

        Boyan Boev

        Comment

        Working...