The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
updating a column in a unix table for a particular row thanuman Shell Programming and Scripting 5 02-09-2009 06:52 PM
shellscript.query Oracle table..populate in a text file bhagat.singh-j Shell Programming and Scripting 7 01-15-2009 02:07 PM
file in to the column of the table sant_leo Shell Programming and Scripting 0 11-30-2006 05:33 PM
Reading a table in a shell script luiscarvalheiro Shell Programming and Scripting 13 08-10-2006 06:16 PM
updating a column in oracle table using shell script sveera Shell Programming and Scripting 3 05-09-2005 01:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-01-2007
Iniquity Iniquity is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 2
First Script: Query every table with column xxx.

Hi all,

Im new to scripting and have no idea how to start this. Recently I had to Query an Oracle database to find a count(distinct version) from every single table inside. I want to write this up into a script for the future.

I have a template to connect to the database, so that is not the issue.
I have tried SELECT COUNT(DISTINCT version) from user_tables, but it will just fail if the column is not found.

So I would like to maybe put in a message that says this table does not contain this column, and then continue on.

Also I would like it to skip any table with a $ in front of it.

Any ideas?

Last edited by Iniquity; 02-01-2007 at 07:04 PM..
  #2 (permalink)  
Old 02-06-2007
Iniquity Iniquity is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 2
I think what I want to accomplish is a mix of sql and scripting, anyone willing to help?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0