Because, if input file is:-
then , it will give o/p as :-
But, Line 2 in o/p should not be printed because, it has only CREATE but there is no TABLE keyword after that.
So, what is needed is to find all occurrences of "CREATE TABLE" with only Newlines & spaces permitted between 2 words.
Last edited by Scott; 12-24-2010 at 08:02 AM..
Reason: Code tags, PLEASE!
Hello all -
I've searched this forum, but was unable to find out the info I need.
I'm trying to mount (nfs mount) a directory on another box from my Linux machine.
The mount point resides on a Tru64 digital unix machine. The machine trying to do the mount is a Linux machine (redhat 8.0).
... (2 Replies)
the command "nawk" returns the error command cannot be found in my unix system.
Is there a specific library i need to have to use this command?
I tried, the whereis command and it returns nothing.
if there is nothing to do, what command can i use to replace this nawk command?
Appreciate some... (4 Replies)
Hi,
i am pretty new to Unix environment .....
Can i get some help from any of you guyz on writing Unix script.
my requirement is like reading a csv file, finding a specific pattern in the lines and repalce the string with new string and write it to another file.
My file is file ABC123.dat... (3 Replies)
Hello All
I have always had a question about find and replace in Vi. As this uses Vi, sed, and RegEx I never knew how or where to post the question but I thought I would give it a shot here. Say I have a text file filled with the following:
Sue, your IP address is 192.168.1.10 which is... (4 Replies)
Hello guys,
In my script, I need to add two other routines where I Manipulate the files with a 'x'
The routine looks at CLI named qip-getobjectprof that references a input file named hosts_list.txt
Then I use the CLI named qip-setobject to set the orignal name with an 'x'and move the... (3 Replies)
Hoping for some assistance.
my source file consists of:
os, ip, username
win7, 123.56.78, john
win7, 123.56.78, paul
win7, 10.1.1.1, john
win7, 10.2.2.3, joe
I've been trying to run a script that will only return ip and username where the IP address is the same and the username is... (3 Replies)
We have year folder say in a path /opt/informat/Archive a folder 2012.
And in the same folder /opt/informat/Archive we have different folders month based, like 201210, 201211, 201212, this have data for each month, ie files. Now time to time i need to move the monthly folders to the main folder... (1 Reply)
Discussion started by: raghavraok
1 Replies
LEARN ABOUT REDHAT
create_table_as
CREATE TABLE AS(7) SQL Commands CREATE TABLE AS(7)NAME
CREATE TABLE AS - create a new table from the results of a query
SYNOPSIS
CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name [ (column_name [, ...] ) ]
AS query
DESCRIPTION
CREATE TABLE AS creates a table and fills it with data computed by a SELECT command. The table columns have the names and data types asso-
ciated with the output columns of the SELECT (except that you can override the column names by giving an explicit list of new column
names).
CREATE TABLE AS bears some resemblance to creating a view, but it is really quite different: it creates a new table and evaluates the query
just once to fill the new table initially. The new table will not track subsequent changes to the source tables of the query. In contrast,
a view re-evaluates its defining SELECT statement whenever it is queried.
PARAMETERS
[LOCAL] TEMPORARY or [LOCAL] TEMP
If specified, the table is created as a temporary table. Refer to CREATE TABLE [create_table(7)] for details.
table_name
The name (optionally schema-qualified) of the table to be created.
column_name
The name of a column in the new table. Multiple column names can be specified using a comma-delimited list of column names. If col-
umn names are not provided, they are taken from the output column names of the query.
query A query statement (that is, a SELECT command). Refer to SELECT [select(7)] for a description of the allowed syntax.
DIAGNOSTICS
Refer to CREATE TABLE [create_table(7)] and SELECT [select(7)] for a summary of possible output messages.
NOTES
This command is functionally equivalent to SELECT INTO [select_into(7)], but it is preferred since it is less likely to be confused with
other uses of the SELECT ... INTO syntax.
COMPATIBILITY
This command is modeled after an Oracle feature. There is no command with equivalent functionality in SQL92 or SQL99. However, a combina-
tion of CREATE TABLE and INSERT ... SELECT can accomplish the same thing with little more effort.
HISTORY
The CREATE TABLE AS command has been available since PostgreSQL 6.3.
SEE ALSO
CREATE TABLE [create_table(7)], CREATE VIEW [create_view(l)], SELECT [select(l)], SELECT INTO [select_into(l)]
SQL - Language Statements 2002-11-22 CREATE TABLE AS(7)