10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
Dear Expert,
I have an table name (SMS) in which two column are there one "Flag" other is "Message", If my flag column consist of status "1" then output should be "welcome", else" try again" ,. please correct my code.
DECLARE
c PLS_INTEGER := dbms_sql.open_cursor;
flag VARCHAR2(50); ... (1 Reply)
Discussion started by: Alone
1 Replies
2. Shell Programming and Scripting
HOW CAN I SELECT AN UNIQUE STRING FROM A FIELD? ACTUALLY I WANT TO PRINT RECORDS THAT 2ND FIELD OF THAT HAVE ONE CHARACTER AND IT MUST BE "P"
AWK '$2~"" {PRINT $0}' IN > OUTBUT THIS CODE PRINT ALL RECORDS WHICH 2ND FIELDS OF THEM START WITH "P" AND MAY CONTAINS ANOTHER CHARACTER! (1 Reply)
Discussion started by: saeed.soltani
1 Replies
3. Shell Programming and Scripting
hi,
#cat /u01/file|grep -v "^#"|cut -f2 -d: -s
i want to avoid repeated lines from the output of the above command.
Do we have anyting like unique in shell scripting.
thx (4 Replies)
Discussion started by: bang_dba
4 Replies
4. Boot Loaders
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies
5. Shell Programming and Scripting
Hi!
From a file the format of whichis as in the sample here below, I need to get two files having just 2 columns, being - for the first file - the 2nd than the 1st from the original file; and - for the second file - the LAST then the 1st column of the original file.
Moreover, I would sort the... (3 Replies)
Discussion started by: mjomba
3 Replies
6. Programming
Is select only supposed to report state changes on an FD's, state, whether or not it had pending input available in the first place? I've got a situation where select() repeatedly reports no FD's ready for stdin when there's lots of data available. And if it only reports changes, how is this... (2 Replies)
Discussion started by: Corona688
2 Replies
7. Shell Programming and Scripting
Hi I have i doubt, actually i have to select everything before a word(pattern).For that i am using sed
i am using the below line of code but it is not working i am getting a blank instead..
sed -n '/regexp/{g;1!p;};h' file1
Can anyone help?
Thanks (15 Replies)
Discussion started by: usha rao
15 Replies
8. UNIX for Advanced & Expert Users
I'm using select() to monitor multiple file descriptors (inet sockets) in application. But this application must also collaborate with other applications on the same host via shared memory (mmap'ed file) due to performance reasons. How can I become notification that mmaped memory is changed or... (1 Reply)
Discussion started by: Hitori
1 Replies
9. IP Networking
Hi,
Off late I had been looking at the differences b/w select() & poll() system calls. The requirement is to reduce the overhead, processor power in waiting for the data. In the kind of connections under consideration there would be very frequent data arriving on the sockets, so poll() fares... (12 Replies)
Discussion started by: smanu
12 Replies
10. UNIX for Advanced & Expert Users
Hai Friends
I am writing a client-server application for backup utility. The computer is used only for backup utility. We have planed to place linux operating system in it. But i am confused with lots of falvour. I don't know really which flavour of linux to use. Can you please suggest me a... (2 Replies)
Discussion started by: collins
2 Replies
SELECT
INTO(7) SQL Commands SELECT INTO(7)
NAME
SELECT INTO - define a new table from the results of a query
SYNOPSIS
[ WITH [ RECURSIVE ] with_query [, ...] ]
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
* | expression [ [ AS ] output_name ] [, ...]
INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY expression [, ...] ]
[ HAVING condition [, ...] ]
[ WINDOW window_name AS ( window_definition ) [, ...] ]
[ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]
[ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
[ FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ] [...] ]
DESCRIPTION
SELECT INTO creates a new table and fills it with data computed by a query. The data is not returned to the client, as it is with a normal
SELECT. The new table's columns have the names and data types associated with the output columns of the SELECT.
PARAMETERS
TEMPORARY or TEMP
If specified, the table is created as a temporary table. Refer to CREATE TABLE [create_table(7)] for details.
new_table
The name (optionally schema-qualified) of the table to be created.
All other parameters are described in detail under SELECT [select(7)].
NOTES
CREATE TABLE AS [create_table_as(7)] is functionally similar to SELECT INTO. CREATE TABLE AS is the recommended syntax, since this form of
SELECT INTO is not available in ECPG or PL/pgSQL, because they interpret the INTO clause differently. Furthermore, CREATE TABLE AS offers a
superset of the functionality provided by SELECT INTO.
Prior to PostgreSQL 8.1, the table created by SELECT INTO included OIDs by default. In PostgreSQL 8.1, this is not the case -- to include
OIDs in the new table, the default_with_oids configuration variable must be enabled. Alternatively, CREATE TABLE AS can be used with the
WITH OIDS clause.
EXAMPLES
Create a new table films_recent consisting of only recent entries from the table films:
SELECT * INTO films_recent FROM films WHERE date_prod >= '2002-01-01';
COMPATIBILITY
The SQL standard uses SELECT INTO to represent selecting values into scalar variables of a host program, rather than creating a new table.
This indeed is the usage found in ECPG (see in the documentation) and PL/pgSQL (see in the documentation). The PostgreSQL usage of SELECT
INTO to represent table creation is historical. It is best to use CREATE TABLE AS for this purpose in new code.
SEE ALSO
CREATE TABLE AS [create_table_as(7)]
SQL - Language Statements 2010-05-14 SELECT INTO(7)