Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extracting column names from a table.. SQL with UNIX Post 302226312 by Vi-Curious on Monday 18th of August 2008 04:53:46 PM
Old 08-18-2008
He wasn't asking you for a description of the table. In sql
Code:
desc table1;

returns the table description (column names and data types).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting Table names from a Select Stament

Hi, I am working on a code to extract the table names out of a select statement. Is there anybody who has worked on something similar? May be you could provide me with the regular expression for the same. Regards. Silas (2 Replies)
Discussion started by: silas.john
2 Replies

2. Shell Programming and Scripting

Print column names along with values from SQL

Hi, Can anyone tell me how to print the column name anong with the value from the table in shell script e.g #!/bin/ksh var=`sqlplus scott/tiger << -e set heading off feedback off select * from emp; quit; e` echo $var My output should be; ... (5 Replies)
Discussion started by: thana
5 Replies

3. UNIX for Dummies Questions & Answers

Extracting all table names from a given server

Using ksh and sqlplus... does anybody have an idea of how we can possibly extract all table names from server :confused:? thanks in advance. (6 Replies)
Discussion started by: fmina
6 Replies

4. UNIX for Dummies Questions & Answers

Advice on extracting special characters from a DB2 table to a file in the UNIX ENV

need some advice on the following situation. I have a DB2 table which has a varchar Column. This varchar column can have special characters like ©, ®, ™ . When I extract from this table to a sequential file for this varchar column I am only able to get © and ® . To Get the ™... (1 Reply)
Discussion started by: cosec
1 Replies

5. Shell Programming and Scripting

Show column names when access a table using perl

Hi all, I am using the following code in order to access the data of a table: my $sql = qq{ SELECT * FROM cc_test_cases}; $sth = $dbh->prepare( $sql ); $sth->execute( ); while(@row1 = $sth->fetchrow_array()) { # print "$row1: $row1\n"; print "@row1\n"; #print("THE VALUE... (1 Reply)
Discussion started by: chriss_58
1 Replies

6. Shell Programming and Scripting

updating a column in a unix table for a particular row

Hi, I have the following requirement. I have a unix table as below progname par1 par2 par3 par4 PROG1 abc def 0012 ooo PROG2 wed xas 0100 xxx PROG3 kkk ppp 0004 ppp Different programs(ex:PROG1,PROG2..) accesses this table and update... (5 Replies)
Discussion started by: thanuman
5 Replies

7. Programming

SQL for table with column (varchar2 2000) and line break in it

Hi, I need a sql statement for a table, which simply stores a text. It has a column ID, key1, key2, ..., text, date etc. The text can be entered using a line break (return) in an oracle form. ID key1 key2 text date 1 K1 ... (16 Replies)
Discussion started by: spidermike
16 Replies

8. UNIX for Dummies Questions & Answers

how to find all .sql file names in all .sh unix files

Hi Guys, Can any one help me on this, I want to write unix command to get all .sh unix file name which are refered .sql files in it. Thanks Kolipaka (3 Replies)
Discussion started by: lakshmanrk811
3 Replies

9. UNIX and Linux Applications

UNIX spool command not extracting complete record from the Oracle table

Hello All, I'm trying to spool an oracle table data into a csv file on unix server but the complete record is not being extracted. The record is almost 1000 characters but only 100 characters are being extracted and rest of the data getting truncated. I'm setting below options : SET... (4 Replies)
Discussion started by: venkat_reddy
4 Replies

10. Shell Programming and Scripting

Using Isql for SQL SERVER to get the table rows counts in UNIX shell script to

need to create shell script to read the table's name from file and connect SQL SERVER using isql (odbcunix) i 'm able connect to database with below command line syntex but i could not get working in shell script with SQL and storing the row count in variable. isql -v DSN USERNAME PASSWD ... (6 Replies)
Discussion started by: pimmit22043
6 Replies
Tangram::Type::Array::Scalar(3pm)			User Contributed Perl Documentation			 Tangram::Type::Array::Scalar(3pm)

NAME
Tangram::Type/Array/Scalar - map Perl array of strings or numbers SYNOPSIS
use Tangram::Core; use Tangram::Type/Array/Scalar; # always $schema = Tangram::Schema->new( classes => { NaturalPerson => { fields => { flat_array => { interests => { table => 'NP_int', sql => 'VARCHAR(50)', }, lucky_numbers => 'int', # use defaults } DESCRIPTION
Maps references to a Perl array. The persistent fields are grouped in a hash under the "array" key in the field hash. The array may contain only 'simple' scalars like integers, strings or real numbers. It may not contain references. For arrays of objects, see Tangram::Type::Array::FromMany and Tangram::Type::Array::FromOne. Tangram uses a table to save the state of the collection. The table has three columns, which contain * the id of the container object * the position of the element in the array * the value of the element The field names are passed in a hash that associates a field name with a field descriptor. The field descriptor may be either a hash or a string. The hash uses the following fields: * type * table * sql Optional field "type" specifies the type of the elements. If the type is "string"Tangram quotes the values as they are passed to the data- base. Not specifying a "type" is exactly equivalent to specifying "string". Optional field "table" sets the name of the table that contains the elements. This defaults to 'C_F', where C is the class of the contain- ing object and F is the field name. Optional field "sql" specifies the type that deploy() (see Tangram::Deploy) should use for the column containing the elements. If this field is not present, the SQL type is derived from the "type" field: if "type" is "string" (or is absent) VARCHAR(255) is used; otherwise, the "type" field is interpreted as a SQL type. If the descriptor is a string, it is interpreted as the value of the "type" field and all the other fields take the default value. perl v5.8.8 2006-03-29 Tangram::Type::Array::Scalar(3pm)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy