SunQuest
           UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old October 6th, 2004, 02:12 PM
trianu trianu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 trianu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
table updating help! in unix

hi

can anybody tell me how can i update a table from unix where
the table column to be updated has not null constraint.thus the values in the column is 'notthere'.
this needs to be updated from a table 2 column having null values
and the 'notthere' needs to be replaced by values in the column from table 2 if any

i am trying to do outer join,
but getting error?
i have also made the procedure for it in sql but how to do it in unx

do i need to run a procedure and if so how to call pl/sql variables in unix?

appreciate help!
trianu

Reply With Quote
  #2  
Old October 6th, 2004, 03:34 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,307 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 28 m 57 sec
Reputation Power: 48
Code:
#!/bin/ksh
UID="user"
PSWD="password"
exsql ()  
{
 awk '{ if(NR == 1) {
        STR=sprintf("%s/%s",UI,PW)
        print STR
        print "set arraysize 1;"
        }
        print $0}' UI=$UID PW=$PSWD | sqlplus -s 
}
var="test"
echo "
select * from 
    mytable 
    where sumfield='$var'
   ;" | exsql
 
exit


Substitute your PL/SQL script for the SQL in the above.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > table updating help! in unix


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway