02-27-2008
actually it has to search the whole create table definition if found
starting from CREATE TABLE ....... to ;
Example:
if the contains :
CREATE TABLE Table1, FALLBACK
(col1 CHAR(4),
col2 INTEGER,
col3 INTEGER,
col4 INTEGER,
col5 INTEGER,
col6 INTEGER)
UNIQUE PRIMARY INDEX (col2)
;
CREATE INDEX (col3) ON Table1 ;
INS Table1 VALUES ( 'AAA',1,1,1,1,1 ) ;
INS Table1 VALUES ( 'BBB',2,2,2,2,2 ) ;
INS Table1 VALUES ( 'CCC',3,3,3,3,3 ) ;
INS Table1 VALUES ( 'DDD',4,4,4,4,4 ) ;
CREATE VIEW View1 as SELECT * from Table1 ;
the search command should return :
CREATE TABLE Table1, FALLBACK
(col1 CHAR(4),
col2 INTEGER,
col3 INTEGER,
col4 INTEGER,
col5 INTEGER,
col6 INTEGER)
UNIQUE PRIMARY INDEX (col2)
;
i think grep will search only single,the search has to traverse the entire definition upto ; and display ...
sorry for the trouble.....,will be glad if you help me
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Good day
Here is my data:
<Journal>
<JournalCode>2</JournalCode>
<JournalType>L</JournalType>
<JournalEntry>SG</JournalEntry>
<JournalAmount>-0.05</JournalAmount>
</Journal>
Problem:
1) I need to query the above tags in xml. Which is from the header <Journal>... (4 Replies)
Discussion started by: lutinoman
4 Replies
2. Shell Programming and Scripting
Hello All,
I am a statistician and I am very new to the world of ksh programming. Daily, I analyze millions of rows of data and land information to DB2 tables. I have recently been asked to develop a ksh script to FTP an export file containing line item data from the production environment to the... (2 Replies)
Discussion started by: jonesdk5
2 Replies
3. Shell Programming and Scripting
Hai,
I need to search a variable inside a file using awk in AIX.
for ex:
file.txt
one
two
three
four
five
i need to get the lines with two
awk '/two/ {print}' file.txt
But i need to change the two as a variable since it would be changed on runtime..i tried like below..nothing give... (3 Replies)
Discussion started by: jesu
3 Replies
4. Shell Programming and Scripting
Hello,
I need a shell script which takes search keyword as input and then searches logs in six different servers and provide me the logs where in it found the keyword.
Can anyone help???? (1 Reply)
Discussion started by: tomlui2010
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have an input file with below data and rules file to apply search and replace by each field in the input based on exact value or pattern.
Could you please help me with unix script to read input file and rules file and then create the output and reject files based on the rules file.
Input... (13 Replies)
Discussion started by: chandrath
13 Replies
6. Shell Programming and Scripting
Hello
I have a configuration file and I want to extract a part of this configuration.
Example of configuration:
profile toto {
bla bla
blabla
}
conftest {
toto {
myarguements
}
I try to do a sed command:
sed -n '/'toto' {$/,/^}/p'
But the result is :
profile toto { (6 Replies)
Discussion started by: maverick31
6 Replies
7. Shell Programming and Scripting
I have a server.xml in about 50 instances of JBOSS servers which has
the following line
<Engine defaultHost="localhost" name="jboss.web">
I need to append something into this line based on the hostname . For example hostname
abcdprod40j.corp.abc.net
<Engine defaultHost="localhost"... (1 Reply)
Discussion started by: gubbu
1 Replies
8. Shell Programming and Scripting
Hi
Need help for below coding scenario.
I have a file with say 4 lines as below.
DEFINE JOB TPT_LOAD_INTO_EMP_DET
( TDPID = @TPT_TDSERVER , USERNAME = @TPT_TDUSER ) ;
( 'DROP TABLE '||@TPT_WRKDB ||'.LOG_'||@TPT_TGT ||' ; ') ,
SELECT * FROM OPERATOR (FILE_READER) ; ) ;
Now I want to... (5 Replies)
Discussion started by: Santanu2015
5 Replies
9. Shell Programming and Scripting
I am trying to write shell script to find and replace using Sed. but i am unable to complete the setting. need help in doing that.
Requirement:
FROM
"${O_INSTANCE}/diag/logs/${C_TYPE}/${C_NAME}/httpd.pid"
TO
"/var/opt/<SID>_<HOSTNAME>/Apache/httpd.pid" (10 Replies)
Discussion started by: avmk0407
10 Replies
10. Shell Programming and Scripting
good afternoon friends
how can I find a shell in all server paths I have only the name of the shell (2 Replies)
Discussion started by: tricampeon81
2 Replies
LEARN ABOUT REDHAT
create_conversion
CREATE
CONVERSION(7) SQL Commands CREATE CONVERSION(7)
NAME
CREATE CONVERSION - define a user-defined conversion
SYNOPSIS
CREATE [DEFAULT] CONVERSION conversion_name
FOR source_encoding TO dest_encoding FROM funcname
DESCRIPTION
CREATE CONVERSION defines a new encoding conversion. Conversion names may be used in the CONVERT() function to specify a particular encod-
ing conversion. Also, conversions that are marked DEFAULT can be used for automatic encoding conversion between frontend and backend. For
this purpose, two conversions, from encoding A to B AND from encoding B to A, must be defined.
To be able to create a conversion, you must have the execute right on the function and the create right on the destination schema. "PARAM-
ETERS"
DEFAULT
The DEFAULT clause indicates that this conversion is the default for this particular source to destination encoding. There should be
only one default encoding in a schema for the encoding pair.
conversion_name
The name of the conversion. The conversion name may be schema-qualified. If it is not, the conversion is defined in the current
schema. The conversion name must be unique within a schema.
source_encoding
The source encoding name.
source_encoding
The destination encoding name.
funcname
The function used to perform the conversion. The function name may be schema-qualified. If it is not, the function will be looked up
in the path.
The function must have the following signature:
conv_proc(
INTEGER, -- source encoding id
INTEGER, -- destination encoding id
CSTRING, -- source string (null terminated C string)
CSTRING, -- destination string (null terminated C string)
INTEGER -- source string length
) returns VOID;
NOTES
Use DROP CONVERSION to remove user-defined conversions.
The privileges required to create a conversion may be changed in a future release.
EXAMPLES
To create a conversion from encoding UNICODE to LATIN1 using myfunc:
CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc;
COMPATIBILITY
CREATE CONVERSION is a PostgreSQL extension. There is no CREATE CONVERSION statement in SQL99.
SEE ALSO
CREATE FUNCTION [create_function(7)], DROP CONVERSION [drop_conversion(7)], PostgreSQL Programmer's Guide
SQL - Language Statements 2002-11-22 CREATE CONVERSION(7)