dbTalk Databases Forums  

Export of data

comp.databases.oracle comp.databases.oracle


Discuss Export of data in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DMina@laiki.com
 
Posts: n/a

Default Export of data - 03-07-2005 , 02:48 AM






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<=sysdate - 130'

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

Thanks


Reply With Quote
  #2  
Old   
Bobiander
 
Posts: n/a

Default Re: Export of data - 03-07-2005 , 06:49 AM






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'),to_date('11.01.2005', 'dd.mm.yyyy'),to_date('13.01.2005',
'dd.mm.yyyy'),to_date('18.01.2005', 'dd.mm.yyyy'))"

this export works here ...


Reply With Quote
  #3  
Old   
DMina@laiki.com
 
Posts: n/a

Default Re: Export of data - 03-10-2005 , 01:40 AM



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:
Quote:
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'),to_date('11.01.2005',
'dd.mm.yyyy'),to_date('13.01.2005',
'dd.mm.yyyy'),to_date('18.01.2005', 'dd.mm.yyyy'))"

this export works here ...


Reply With Quote
  #4  
Old   
Bobiander
 
Posts: n/a

Default Re: Export of data - 03-11-2005 , 03:22 AM



What is format of insert_date column , may be you must
trunc(insert_date) 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_date) >= trunc(sysdate)

....

Boyan Boev


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.