Sponsored Content
Top Forums Shell Programming and Scripting Store table contents in csv file Post 302441716 by AlbertGM on Monday 2nd of August 2010 06:28:54 AM
Old 08-02-2010
Toad can do that for you.
Select schema browser view ==> Right click on table ==> Save as...

Is this enough?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script for converting file contents into CSV

Hi, I am new in unix, I just want to replace some values from text file according to column numbers. Like, I am having a table as given below: val1 val2 val3 val4 val5 val6 val7 val8 val9 val10 val11 val12 val13 Now i want... (5 Replies)
Discussion started by: rish_max
5 Replies

2. Shell Programming and Scripting

store the table data in excel file

Hello - I have a below table and i want to extract the data into excel sheet and send to different location. Here is the table structure... SQL> desc t_i1_exportdocs Name Null? Type ----------------------------------------- --------... (11 Replies)
Discussion started by: govindts
11 Replies

3. Shell Programming and Scripting

Most reliable way to store file contents in an array in bash

Hi Guys, I have a file which has numbers in it separated by newlines as follows: 1.113 1.456 0.556 0.021 -0.541 -0.444 I am using the following code to store these in an array in bash: FILE14=data.txt ARRAY14=(`awk '{print}' $FILE14`) (6 Replies)
Discussion started by: npatwardhan
6 Replies

4. UNIX and Linux Applications

Does anybody know how to store my tables to a csv file?

Hi I'm using an oracle database... Lets call it databasename My username and password are the same .... lets all that andrea/andrea So I want to write a script to copy all the data from my table called tablename and store that data to a csv file called filename. I cant seem to get... (2 Replies)
Discussion started by: ladyAnne
2 Replies

5. UNIX for Dummies Questions & Answers

Storing data from a table into a csv file

Hi I need to write a bash script to take the data stored in 3 oracle tables .. and filter them and store the results in a csv file. It is an Oracle database Thank you (1 Reply)
Discussion started by: ladyAnne
1 Replies

6. Shell Programming and Scripting

Read the contents of a file and store them in a variable

Hi Gurus, I am trying for a scenario where in I want to read the contents of a file line by line and then store them in variables. Below is the script: #!/bin/ksh while read line do id=`echo $line | cut -f1 -d |` name=`echo $line | cut -f2 -d |` echo $id ... (11 Replies)
Discussion started by: svajhala
11 Replies

7. Shell Programming and Scripting

Convert file in csv or table

Hi there, i have a file like that in attachment (PLEVA3_280711_SAP.txt), i would extract some basic information from it and report in a new file or table like this: i try to use bash and i extract the single object in this way (see attach scriptino.sh), but i receive a strange... (5 Replies)
Discussion started by: alen192
5 Replies

8. Shell Programming and Scripting

Place the contents of a .CSV file to an array

Hi, I am trying to place the contents of a .CSV file to an array, but not sure how to do that. Here is my .CSV file content: App,SLA,Job name,Avg start time,Avg run time,Frequency,Downstream apps XYZ,,ABC14345,3:00 AM,00.04.00,Daily,STAMP XYZ,9:00,ABC12345,3:15 AM,00.05.00,Daily,STAMP ... (4 Replies)
Discussion started by: ajayakunuri
4 Replies

9. Shell Programming and Scripting

Update the table using values from a csv file

i want to run update query for oracle which is in up.sql taking values from a.csv. I have implemented shell script to do it. extn="perl" ls -1 | while read file do echo "$file,$extn" > a.csv done up.sql contains update file_list set filename=$1 where extn=$2; The code to update is... (2 Replies)
Discussion started by: millan
2 Replies

10. UNIX for Dummies Questions & Answers

Trying To Write File Contents To Specfic .csv Cell

Hi, I'm attempting to write the entire contents of a file to a specific .csv cell. So far have only a nawk one liner that will write a value into a specific .csv cell. Trying to use man page but can't seem to get any farther. Any help would be appreciated. nawk -v r=2 -v c=3 -v val=5 -F,... (7 Replies)
Discussion started by: jimmyf
7 Replies
CREATE 
VIEW(7) SQL Commands CREATE VIEW(7) NAME
CREATE VIEW - define a new view SYNOPSIS
CREATE [ OR REPLACE ] VIEW view [ ( column name list ) ] AS SELECT query INPUTS view The name (optionally schema-qualified) of a view to be created. column name list An optional list of names to be used for columns of the view. If given, these names override the column names that would be deduced from the SQL query. query An SQL query (that is, a SELECT statement) which will provide the columns and rows of the view. Refer to SELECT [select(7)] for more information about valid arguments. OUTPUTS CREATE VIEW The message returned if the view is successfully created. ERROR: Relation 'view' already exists This error occurs if the view specified already exists in the database. WARNING: Attribute 'column' has an unknown type The view will be created having a column with an unknown type if you do not specify it. For example, the following command gives a warning: CREATE VIEW vista AS SELECT 'Hello World' whereas this command does not: CREATE VIEW vista AS SELECT text 'Hello World' DESCRIPTION
CREATE VIEW defines a view of a query. The view is not physically materialized. Instead, a query rewrite rule (an ON SELECT rule) is auto- matically generated to support SELECT operations on views. CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced. You can only replace a view with a new query that generates the identical set of columns (i.e., same column names and data types). If a schema name is given (for example, CREATE VIEW myschema.myview ...) then the view is created in the specified schema. Otherwise it is created in the current schema (the one at the front of the search path; see CURRENT_SCHEMA()). The view name must be distinct from the name of any other view, table, sequence, or index in the same schema. NOTES Currently, views are read only: the system will not allow an insert, update, or delete on a view. You can get the effect of an updatable view by creating rules that rewrite inserts, etc. on the view into appropriate actions on other tables. For more information see CREATE RULE [create_rule(7)]. Use the DROP VIEW statement to drop views. USAGE
Create a view consisting of all Comedy films: CREATE VIEW kinds AS SELECT * FROM films WHERE kind = 'Comedy'; SELECT * FROM kinds; code | title | did | date_prod | kind | len -------+---------------------------+-----+------------+--------+------- UA502 | Bananas | 105 | 1971-07-13 | Comedy | 01:22 C_701 | There's a Girl in my Soup | 107 | 1970-06-11 | Comedy | 01:36 (2 rows) COMPATIBILITY
SQL92 SQL92 specifies some additional capabilities for the CREATE VIEW statement: CREATE VIEW view [ column [, ...] ] AS SELECT expression [ AS colname ] [, ...] FROM table [ WHERE condition ] [ WITH [ CASCADE | LOCAL ] CHECK OPTION ] The optional clauses for the full SQL92 command are: CHECK OPTION This option is to do with updatable views. All INSERT and UPDATE commands on the view will be checked to ensure data satisfy the view-defining condition. If they do not, the update will be rejected. LOCAL Check for integrity on this view. CASCADE Check for integrity on this view and on any dependent view. CASCADE is assumed if neither CASCADE nor LOCAL is specified. CREATE OR REPLACE VIEW is a PostgreSQL language extension. SQL - Language Statements 2002-11-22 CREATE VIEW(7)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy