How to compare to values returned from sql in shell scripting?
hey i am using this code to connect to sql , store the value in variable and then
compare it with another variable after some time by executing the same query
but the desired result is not coming
Last edited by Scott; 05-07-2013 at 09:02 AM..
Reason: Code tags; Moved thread - does not appear to be an AIX-specific problem
Hi,
I want to extract data from database table to a flat file using shell scripting. For loading data from file to a table, I had used SQL Loader. How can I do the vice versa using shell scripting.
Thanks in advance (3 Replies)
Hi,
I have a file that has contents like this:
SQL> select * from details;
NAME REG
-------------------- ----------
Mani 1
Santosh 2
Manju 3
Mukesh 4
SQL> spool off;
... (5 Replies)
Hi,
I have a file containing the following data:
junk123junk723itemcode001qty01price10total10junkjunk
junk123junk723itemcode002qty02price10total20junkjunk
..
..
..
could be 5000+ lines
I have an algo and need a code to implement this:
1. Linecount = wc -l (should give 5000)
2. For i... (1 Reply)
hi
iam new of scipiting.give me the some Material of regarding sql in scripting.
and i have no backup's in 3 severs.how to write script in dirctory.
please give me some usefull information
cheers
Naveen.g (2 Replies)
Hi guyz,
Posting a thread after a long time.
I want to pass two variables to unix shell script from sql script.
Note: I am calling sql script from unix script. sql script has 2 variables one is the return code for status of program run and second one email flag. I don't know how to capture... (3 Replies)
Hi,
I am looking for some books that have examples of both Oracle SQL and Shell script being used together. For example, to insert 500 rows into a table using a script. I already have books that cover Shell scripting or SQL, but as separate subjects. I am looking for books that have both of... (3 Replies)
Hi,
I need to write a shell script file that does
1)Connects to DB using SQL plus
2)Do some SQL query like select * from....
3)Based on the output that I got from the sql query I will have to write a if else loop.
Plz let me know how to write the shell scripting for this.
Thanks for... (1 Reply)
HI friends , i am also facing an issue in mysql
i ma trying to insert detail in a variable but not got success
#!/bin/sh
mysql -u<username> -p<password> <dbname> << EOF
DEV=`mysql --skip-column-names <dbname> -e "SELECT timestamp from process_record where id = 1"`
EOF
echo $DEV
ERROR... (3 Replies)
hey i have to connect to sql through shell script , then store the value of the query in a variable and then compare it after some time after running a process.
i have used this code but it is not working.
#!/bin/sh
Val = (sqlplus -s rte/rted2@rel76d2 <<!
SELECT MAX(STAT_ID) FROM CVT_STATS;... (3 Replies)
Can anyone please assist me?
I have attached 2 input files and one output file. I need to generate the sql update statements using the above 2 input files. if inputfile2 has 5 rows, then we should generate 5 update statements because column1 is unique. inputfile1 and inputfile2 may contain more... (10 Replies)
Discussion started by: vinus
10 Replies
LEARN ABOUT NETBSD
ucas
UCAS(9) BSD Kernel Developer's Manual UCAS(9)NAME
ucas -- atomic memory operations on user-space address
SYNOPSIS
#include <sys/systm.h>
int
ucas_ptr(volatile void *uptr, void *old, void *new, void *retp);
int
ucas_int(volatile int *uptr, int old, int new, int *retp);
DESCRIPTION
These functions provide compare-and-swap (CAS) functionality on user-space address.
Except that they can be safely used for the kernel to access user-space address, they are semantically equivalents of atomic_cas(3).
uptr The pointer to the variable. This should be a user-space pointer.
old The value to compare with the variable.
new The value to store to the variable.
retp The pointer to the memory to store the old value of the variable.
RETURN VALUES
On success, these functions return 0. In that case, the caller can consult the value returned via retp to check the result of the CAS opera-
tion. Otherwise, these functions return an appropriate errno(9) error code, typically EFAULT.
SEE ALSO atomic_cas(3), intro(9)BUGS
Conceptually, the retp argument of ucas_ptr() would be of void **. The current prototype is a compromise for usability.
BSD October 24, 2011 BSD