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
towctrans(3C)															     towctrans(3C)

NAME
towctrans(), wctrans() - character transliteration SYNOPSIS
DESCRIPTION
The function transliterates the wide-character code wc using the mapping described by desc. The current setting of the category should be the same as during the call to that returned the value desc. If the value of desc is invalidated (that is, not obtained by a call to or desc is invalidated by a subsequent call to that has affected category the result is undefined. The function is defined for valid character mapping names identified in the current locale. The charclass is a string identify- ing a generic character mapping name for which codeset-specific information is required. The following character mapping names are defined in all locales - "tolower" and "toupper". The function returns a value of type which can be used as the second argument to subsequent calls of The function determines values of according to the rules of the coded character set defined by character mapping information in the program's locale (category The values returned by are valid until a call to that modifies the category APPLICATION USAGE
The strings "tolower" and "toupper" are reserved for the standard mapping names. In the table below, the functions in the left column are equivalent to the functions in the right column. The prototypes of these functions are available to applications if they are: a. conformant. b. Compiled with macro with a value >=500. c. Compiled with macro with a value >= 200112. RETURN VALUE
If successful, the function returns the mapped value of wc using the mapping described by desc. Otherwise it returns wc unchanged. The function returns (wchar_t)0 if the given character mapping name is not valid for the current locale (category otherwise it returns a non-zero object of type that can be used in calls to ERRORS
The function may fail if: desc contains an invalid transliteration descriptor. The function may fail if: The character mapping name pointed to by charclass is not valid in the current locale. AUTHOR
were developed by HP and Mitsubishi Electric Corporation. SEE ALSO
wconv(3C), thread_safety(5). towctrans(3C)
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy