Sponsored Content
Top Forums Shell Programming and Scripting Convert the SQL Query in Shell Script Post 302881634 by pvmanikandan on Monday 30th of December 2013 04:07:46 PM
Old 12-30-2013
Convert the SQL Query in Shell Script

Hi All,

I have a query with output below

Code:
select 'create synonym "'||TABLE_NAME||'" for '||Table_owner||'."'||table_name||'"'||chr(59) from user_synonyms;

==================

create synonym "RV_SBC_SIG" for WFCONTROLLER_TE."RV_SBC_SIG";
create synonym "AQM_TASK" for AWQM_TE."AQM_TASK";
create synonym "INTERFACE_MSG" for PRISM_TE."INTERFACE_MSG";

I want to convert that _TE to _TH in sql query itself. Can we do it using sed or any other way to do that?. Please suggest.

Thanks,
Mani
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing a SQL query from a shell script

I cannot figure out how to run a SQL script, or just a sqlplus query, from a shell script (bash or ksh). Basically, I need to su - oracle from root and run a query, then test the exit status. (3 Replies)
Discussion started by: 98_1LE
3 Replies

2. UNIX for Advanced & Expert Users

Connecting DB in the Shell Script to do SQL Query

Any link or example to write shell script for the Connecting Oracle for Quering through SQL thanks in advance ... Cheers !! Mehul Doshi (3 Replies)
Discussion started by: mehuldoshi
3 Replies

3. Shell Programming and Scripting

Executing Sql Query Using Shell Script

HI ALL i have a requirement like this. i have to write a shell script to run a sql query. DB is oracle. once the query is run, the results of the query has to be published in a data file. can you please advice me how to go about it. i am absolutely new to shell scripts and this is a part of my job. (14 Replies)
Discussion started by: ragha81
14 Replies

4. Shell Programming and Scripting

executing a SQL query in shell script

Hi ALL, I need an help in connecting to oracle database, executing a select query and printing it on the screen. Can any one please write a simple code or psuedo code and let me know. select query returns multiple values( say select name from emp) Thanks in advance LM (1 Reply)
Discussion started by: lijju.mathew
1 Replies

5. Shell Programming and Scripting

query sql using shell script

query sql using shell script, is it possible? my friend told me to do a file.sql and link to my shell script, but can i query sql using shell script? thanks in advance! (2 Replies)
Discussion started by: kingpeejay
2 Replies

6. Shell Programming and Scripting

$ symbol in sql query in shell script

Hi Team, Can you please help me to resolve this issue. Am unable to use this $ symbol in sql query in the shell script. For Example: # !/bin/sh export USER_NAME=XXX export PASSWORD=YYY export ORACLE_SID=xamdb echo $ORACLE_SID echo " Session Details ..." ... (1 Reply)
Discussion started by: indira_s
1 Replies

7. UNIX for Dummies Questions & Answers

Regarding executing sql query in shell script

Hi, I have one SQL file prepared in UNIX and one script that is executing that. In SQL i have Update and create queries. I want to introduce conditions in SQL file (in UNIX) that if either of the create or update query failes whole transaction should be rollback. I just have 1 create... (2 Replies)
Discussion started by: abhii
2 Replies

8. Red Hat

Sql query through shell script

hey , i am using this code to store value of a sql query and and then use it in other query but after some time , but it is not working. please help #!/bin/bash val_1=$( sqlplus -s rte/rted2@rel76d2 << EOF setting heading off select max(stat_id) from cvt_stats; exit EOF ) nohup... (5 Replies)
Discussion started by: ramsavi
5 Replies

9. Shell Programming and Scripting

How do I read sql query into shell script?

Hello All, I'm trying to put together a shell script that will: 1. connect to an oracle database 2. execute a query 3. save the output to a csv file I know that I can execute the sqlplus -s user/pass @dbsid and get logged in. What I would like to do is have my query in a separate text... (9 Replies)
Discussion started by: bbbngowc
9 Replies

10. Shell Programming and Scripting

Shell script to execute sql query.

Hi Experts, Need your support. Not able to use sql query alias in shell script. Could you please help me in finding right way to use alias with sql query in shell script. Below is the code i am using. #!/bin/bash sqlplus -s abc/abc@abc << EOF> bcd.csv set trimspool on select zone_id... (4 Replies)
Discussion started by: as7951
4 Replies
AIPTEK(4)						     Kernel Interfaces Manual							 AIPTEK(4)

NAME
aiptek - Aiptek USB Digital Tablet Input Driver for Linux SYNOPSIS
Section "InputDevice" Identifier "idevname" Driver "aiptek" Option "Device" "devpath" ... EndSection DESCRIPTION
aiptek is an Xorg input driver for Aiptek HyperPen USB-based tablet devices. This driver only supports the USB protocol, and only under Linux; for RS-232C-based HyperPens, please see the "hyperpen" driver. The aiptek driver functions as a pointer input device, and may be used as the X server's core pointer. SUPPORTED HARDWARE
This driver supports the Aiptek HyperPen 4000U, 5000U, 6000U, 8000U and 12000U USB-based input tablet on some Linux platforms. CONFIGURATION DETAILS
Please refer to xorg.conf(5) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. Multiple instances of the Aiptek devices can cohabit. It can be useful to define multiple devices with different active zones. Each device supports the following entries: Option "Type" "stylus"|"eraser"|"cursor" sets the type of tool the device represent. This option is mandatory. Option "Device" "path" sets the path to the special file which represents serial line where the tablet is plugged. You have to specify it for each subsection with the same value if you want to have multiple devices with the same tablet. This option is mandatory. Option "USB" "on" specifies that you are using the USB bus to communicate with your tablet. This setting is mandatory, as USB is the only proto- col supported by this driver. Option "DeviceName" "name" sets the name of the X device. Option "Mode" "Relative"|"Absolute" sets the mode of the device. Option "HistorySize" "number" sets the motion history size. By default the value is zero. Option "AlwaysCore" "on" enables the sharing of the core pointer. When this feature is enabled, the device will take control of the core pointer (and thus will emit core events) and at the same time will be able, when asked so, to report extended events. You can use the last available integer feedback to control this feature. When the value of the feedback is zero, the feature is disabled. The fea- ture is enabled for any other value. Option "XTop" "number" First of three sets of parameters to set the active zone. This sets the X coordinate of the top corner of the active zone. "TopX" is a synonym. Option "YTop" "number" First of three sets of parameters to set the active zone. This sets the Y coordinate of the top corner of the active zone. "TopY" is a synonym. Option "XBottom" "Inumber" First of three sets of parameters to set the active zone. This sets the X coordinate of the bottom corner of the active zone. "BottomX" is a synonym. Option "YBottom" "number" First of three sets of parameters to set the active zone. This sets the Y coordinate of the bottom corner of the active zone. "BottomY" is a synonym. Option "XMax" "number" Second of three sets of parameters to set the active zone. This sets the the X coordinate of the bottom corner of the active zone. The Top X corner's coordinate is fixed at 0. "MaxX" is a synonym. Option "YMax" "number" Second of three sets of parameters to set the active zone. This sets the the Y coordinate of the bottom corner of the active zone. The Top Y corner's coordinate is fixed at 0. "MaxY" is a synonym. Option "XOffset" "number" Third of three sets of parameters to set the active zone. This sets the X coordinate of the top corner of the active zone. "OffsetX" is a synonym. Option "YOffset" "number" Third of three sets of parameters to set the active zone. This sets the Y coordinate of the top corner of the active zone. "OffsetY" is a synonym. Option "XSize" "number" Third of three sets of parameters to set the active zone. This sets the X coordinate of the bottom corner of the active zone. Unlike others, this parameter is expressed in relative coordinates from the "XOffset" parameter. "XSize" is a synonym. Option "YSize" "number" Third of three sets of parameters to set the active zone. This sets the Y coordinate of the bottom corner of the active zone. Unlike others, this parameter is expressed in relative coordinates from the "YOffset" parameter. "YSize" is a synonym. Option "ZMin" "number" Minimum pressure reading that will be accepted from the Stylus tool. "MinZ" is a synonym. Option "ZMax" "number" Maximum pressure reading that will be accepted from the Stylus tool. "MaxZ" is a synonym. Option "XThreshold" "number" Minimal change in X coordinate position that will be accepted as data input. "ThresholdX" is a synonym. Option "YThreshold" "number" Minimal change in Y coordinate position that will be accepted as data input. "ThresholdY" is a synonym. Option "ZThreshold" "number" Minimal change in pressure reading that will be accepted as data input. "ThresholdZ" is a synonym. Option "InvX" "on" Inverts X coordinate reports. "XInv" is a synonym. Option "InvY" "on" Inverts Y coordinate reports. "YInv" is a synonym. Option "Pressure" "soft"|"hard"|"linear" Pressure reports either delivered in linearly incremental values (default), or perturbed by one of two log-linear algorithms ("soft" or "hard".) Option "KeepShape" "on" When this option is enabled, the active zone begins according to TopX and TopY. The bottom corner is adjusted to keep the ratio width/height of the active zone the same as the screen while maximizing the area described by the active area set of parameters, XTop/YTop/XBottom/YBottom, XMax/YMax, or XOffset/YOffset/XSize/YSize. Option "DebugLevel" number sets the level of debugging info reported. This driver is currently Linux specific. SEE ALSO
Xorg(1), xorg.conf(5), Xserver(1), X(7), hyperpen(4). AUTHORS
Bryan W. Headley <bheadley@earthlink.net> PROJECT PAGE
http://aiptektablet.sourceforge.net tracks ongoing development of this driver, the Linux kernel driver, and a GUI front-end application that works in concert with the above. X Version 11 xf86-input-aiptek 1.4.1 AIPTEK(4)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy