Home » RDBMS Server » Server Utilities » Export using query (Oracle 10g)
Export using query [message #413640] Thu, 16 July 2009 22:16 Go to next message
kmkumar24
Messages: 69
Registered: January 2007
Location: Singapore
Member
Hello,

I am first time using the query on export utility for a table dump. I tried with this command, but getting error. Pl help me to resolve the syntax error, I tried changing to find the appropriate one, but finding very difficult.


exp scott/tiger tables=WIP_CACHE query=\"where TEST_TYPE = IL or HOLOGRAM or SPECTRUM or FFP and PRE_DATE\>\(\'1 July 2009'\)\" file=table.dmp consistent=y direct=n buffer=1048576 log=tables.log



Thanks in Advance
Re: Export using query [message #413644 is a reply to message #413640] Thu, 16 July 2009 22:37 Go to previous messageGo to next message
kmkumar24
Messages: 69
Registered: January 2007
Location: Singapore
Member
When I use the below query, I am getting this error

exp scott/tiger file=table.dmp tables=WIP_CACHE query=\"where TEST_TYPE = IL or HOLOGRAM or SPECTRUM or FFP and PRE_DATE > 1 July 2009\" consistent=y direct=n buffer=1048576



About to export specified tables via Conventional Path ...
Current user changed to YMS
. . exporting table T_A_WIP_CACHE
EXP-00056: ORACLE error 920 encountered
ORA-00920: invalid relational operator
Export terminated successfully with warnings.
Re: Export using query [message #413650 is a reply to message #413640] Thu, 16 July 2009 22:58 Go to previous messageGo to next message
BlackSwan
Messages: 25037
Registered: January 2009
Location: SoCal
Senior Member
>where TEST_TYPE = IL or HOLOGRAM or SPECTRUM or FFP and PRE_DATE > 1 July 2009

If you attempted to use the "clause" above in a SELECT statement it would results NUMEROUS errors!
Re: Export using query [message #413652 is a reply to message #413640] Thu, 16 July 2009 23:14 Go to previous message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to follow SQL syntax and not invent your own and expect Oracle will know and follow it.

Regards
Michel
Previous Topic: size of database which i m going to export
Next Topic: Not showing the exact language after import
Goto Forum:
  


Current Time: Mon Dec 05 06:44:42 CST 2016

Total time taken to generate the page: 0.08890 seconds