Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:21 PM
DMina@laiki.com
Guest
 
Posts: n/a
Default 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<=sysdate - 130'

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

Thanks

  #2  
Old July 19th, 2005, 11:21 PM
Bobiander
Guest
 
Posts: n/a
Default 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'),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 ...

  #3  
Old July 19th, 2005, 11:21 PM
DMina@laiki.com
Guest
 
Posts: n/a
Default 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:[color=blue]
> 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',[/color]
'dd.mm.yyyy'),to_date('13.01.2005',[color=blue]
> 'dd.mm.yyyy'),to_date('18.01.2005', 'dd.mm.yyyy'))"
>
> this export works here ...[/color]

  #4  
Old July 19th, 2005, 11:21 PM
Bobiander
Guest
 
Posts: n/a
Default Re: Export of data

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

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles