Export Query not Working in Shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Export Query not Working in Shell
# 1  
Old 07-20-2006
Export Query not Working in Shell

I am exporting data using a shell program. I am getting all of the records instead of getting a subset based on my query. The export_problem.par lists all of my tables. I tried the query with the ' and without it. How do I get the export to use the query?

Thanks!

COMPRESSED_FILE=$DATADIR/perprod_hd_problem.dmp.Z
PARFILE=$DATADIR/export_problem.par
query="'where add_months(close_time, 15) < sysdate'"
DIRECT=
ERROR="In step export HD problem data step 1 of 3"
echo "Export HD problem data"
exported data but
# 2  
Old 07-20-2006
\' and \"

"escaping" a metacharacter forces the shell to interpretet certain characters literally. You can also use \047 (octal) for these characters as well.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

export variable not working after su

I have a requirement to change user inside a shell script and execute group of commands. I have done it many times earlier but never came across the issue with exporting variables. Strangely if a var is exported afetr su, it is not working where as if it is does outside su, it works. Another issue... (8 Replies)
Discussion started by: sasiharitha
8 Replies

2. Shell Programming and Scripting

export of a variable isn't working

Hi I want export input data ... echo "month: " read m export m=$m also export m is not working ? the month-variable should be exportet for the use in other scripts, but it is not working like this. What i'm doing wrong? Thanks in advance! IMPe (10 Replies)
Discussion started by: IMPe
10 Replies

3. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

4. Solaris

nfs export not working at boot

we have a Solaris 8 nfs server that exported two shares. entries are in /etc/dfs/dfstab. clients have been accessing these shares for several years. we just rebooted this nfs server and noticed that no share gets exported. I don't see relevant messages from dmsg nor messages file, is there... (6 Replies)
Discussion started by: jalite19
6 Replies

5. UNIX and Linux Applications

MYSQL: Help understanding this working query

Hi there, I have a query that works just fine, but im having a little problem understanding how it works and have been struggling to find any docs that explain the techniques that are being used. If anybody out there could explain how this is put together then that would be great I have three... (1 Reply)
Discussion started by: rethink
1 Replies

6. Shell Programming and Scripting

export not working in Bash shell

Hi Friends, I am presently migrating shell scripts writter in KSH to SH.I am stuck at this place and i am not able to find a work around:- Let the script name is x.sh Below are some of the codes in it... export abc=hello export abc=hi export abc=how When i am trying to compile the script ... (6 Replies)
Discussion started by: amit.behera
6 Replies

7. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

8. AIX

export command is not working in AIX5.3

I am trying to export command at shell in AIX5.3. example: environment variable SAMPLE=test is set. after logged in to the shell, i tried to export this variavle to $ export SAMPLE=test1. If i do $ echo $SAMPLE, it is still giving test instead of test1. what shall i do?? (1 Reply)
Discussion started by: balareddy
1 Replies

9. Shell Programming and Scripting

to create a export query from a file

Hi Guys,,, I have a file which is of this type. abdc defd afds adfse I want to create a export statement like this. Db2 "export to /clocal/rem/user/rem/used.txt of del select * from t.tel where name in ('abdc','defd','afds','adfse') with ur" Please help me.. Thanks for... (2 Replies)
Discussion started by: mac4rfree
2 Replies

10. Solaris

A query regarding /export/home in Solaris

Friends, I am new to Solaris, but familiar with Linux. Could you throw some light on the need for /export/home directory in Solaris. In Linux, the default home directory for a normal user is /home/<username>. If domain concept is implemented, then the /home directory of server will be mounted... (4 Replies)
Discussion started by: saagar
4 Replies
Login or Register to Ask a Question