Home » RDBMS Server » Server Utilities » PB in export and query
PB in export and query [message #170553] Thu, 04 May 2006 05:39 Go to next message
Haler
Messages: 71
Registered: October 2004
Member
Hello,
How to escape parameter like with % (windows 2000)?

Ex:
exp mac/mic@soin log=exptest.log file=expfictest.dmp tables=cetabli query='where codeta between 40 and 49 and siret like ''77562/%'''

like ''77562''' give 0 rows (3 rows in the table)
like ''77562/%''' give 0 rows
like ''77562%''' give 0 rows
like ''77562\%''' give 0 rows
Re: PB in export and query [message #170593 is a reply to message #170553] Thu, 04 May 2006 07:54 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> select ename from emp where ename like ('%LA%');

ENAME
----------
BLAKE
CLARK

C:\>exp scott/tiger@teng tables=emp query='where ename like (''%LA%'')'

Export: Release 10.2.0.1.0 - Production on Thu May 4 08:56:34 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table                            EMP          2 rows exported
Export terminated successfully without warnings.

Re: PB in export and query [message #170611 is a reply to message #170593] Thu, 04 May 2006 08:48 Go to previous messageGo to next message
Haler
Messages: 71
Registered: October 2004
Member
Hello,

Ok with cmd.exe and c:\exp scott/...etc
but not operationnel in command file
par ex: expfic.cmd

echo debutsauve:%date%,%time%>datesauvegarde.lst
set oracle_sid=soin
exp mic/mac@soin log=exptest.log file=expfictest.dmp tables=cetabli query='where siret like (''77562%'')' statistics=none
echo finsauve:%date%,%time%>>datesauvegarde.lst

result: 0 rows

[Updated on: Thu, 04 May 2006 08:51] by Moderator

Report message to a moderator

Re: PB in export and query [message #170614 is a reply to message #170611] Thu, 04 May 2006 08:52 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> but not operationnel in command file
What do you mean by that?
My sample session is in command line.

Post the description of your table
Re: PB in export and query [message #170615 is a reply to message #170614] Thu, 04 May 2006 08:52 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
And please use CODE tags while posting any code. Makes it easy to read.
Re: PB in export and query [message #170621 is a reply to message #170615] Thu, 04 May 2006 09:07 Go to previous messageGo to next message
Haler
Messages: 71
Registered: October 2004
Member
I execute this: c:\expfic.cmd

You execute that:
exp scott/tiger@teng tables=emp query='where ename like (''%LA%'')'

please What is CODE tags?
Re: PB in export and query [message #170626 is a reply to message #170621] Thu, 04 May 2006 09:31 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Haler wrote on Thu, 04 May 2006 16:07

please What is CODE tags?

link Wink

MHE
Re: PB in export and query [message #170629 is a reply to message #170621] Thu, 04 May 2006 09:45 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You are right and i failed to understand you. Excuse my ignorance.
As a workaround, You can make use of a parfile as shown. Throw all your commands (parameters) in the
parfile(parameter file). Obviously, there must be some kind of escape character for '%', but for know parfile should work.
C:\>expfic

Export: Release 10.2.0.1.0 - Production on Thu May 4 10:44:25 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table                            EMP          2 rows exported
Export terminated successfully without warnings.


C:\>type expfic.cmd
@echo off
exp scott/tiger@teng parfile=parfile.par

C:\>type parfile.par
tables=emp query='where ename like (''%LA%'')'

[Updated on: Thu, 04 May 2006 09:47]

Report message to a moderator

Re: PB in export and query [message #170634 is a reply to message #170629] Thu, 04 May 2006 09:58 Go to previous message
Haler
Messages: 71
Registered: October 2004
Member
That's correct.
Thanks for all.
Previous Topic: How to write a control file to concatenate or add fileds (sql Loader)
Next Topic: Unable to upload "SYSDATE" using SQL*Loader
Goto Forum:
  


Current Time: Sat Jun 29 09:32:16 CDT 2024