|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > table updating help! in unix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|