I know that in oracle the is a way to write to ignore the dupkey, something like
Is there a way to do the same thing but with unix commands? I think there's a way with WHENEVER SQLERROR EXIT SQL.SQLCODE but i'm not sure and i don't know how do it. Thanks
ps: i mean records in the db. Ignore when there are the same record and go on.
Hi All,
Long question and possibly a very short answer....
At work we've just got a new 3rd party backup solution (Netvault by Bakbone -it's v. nice), and I'm currently setting up my UNIX clients as part of the backup schedule. It's just occurred to me that there may be certain files or... (4 Replies)
Hi
I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line?
My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like... (5 Replies)
Dear All,
I am using find command
find /my_rep/*/RKYPROOF/*/*/WDM/HOME_INT/PWD_DATA -name rk*myguidelines*.pdf -print
The problem i am facing here is find /my_rep/*/
the directory after my_rep could be mice001, mice002 and mice001_PO, mice002_PO
i want to ignore mice***_PO directory... (3 Replies)
Hello,
i have bash script where im cycling some command for different lines in external file.
example:
while read domain;do
nslookupout=$(nslookup -type=ns $domain) || true
another commands
done < filenamewithdomains
i added:
|| true
after the command in belief it will just skip... (6 Replies)
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
Hi,
I am using following command to find a specific file.
find . -name "find*.txt" -type f -print
I am issuing that command at root directory since I don't know in which sub folder that file is getting created from some other process.
As I am not having access to all directories, my... (3 Replies)
Hi,
How can i ignore case between 2 files in unix using COMM command.
2 input files are:
-bash-4.1$ more x2.txt
HELLO
hi
HI
raj
-bash-4.1$ more x3.txt
hello
hi
raj
COMM command:
-bash-4.1$ comm x2.txt x3.txt
hello
HELLO
hi (3 Replies)
Hello,
I am searching the following string Folder^ in a file and replacing it with Folder^/
However if the file already contains Folder^/ I want to avoid replacing it with Folder^//
To do this I have to do the following today:
1) echo "Folder^" | sed 's/Folder\^/Folder\^\//g'
I get... (2 Replies)
Discussion started by: mehimadri12
2 Replies
LEARN ABOUT PHP
db2_conn_errormsg
DB2_CONN_ERRORMSG(3) 1 DB2_CONN_ERRORMSG(3)db2_conn_errormsg - Returns the last connection error message and SQLCODE valueSYNOPSIS
string db2_conn_errormsg ([resource $connection])
DESCRIPTION db2_conn_errormsg(3) returns an error message and SQLCODE value representing the reason the last database connection attempt failed. As
db2_connect(3) returns FALSE in the event of a failed connection attempt, do not pass any parameters to db2_conn_errormsg(3) to retrieve
the associated error message and SQLCODE value.
If, however, the connection was successful but becomes invalid over time, you can pass the $connection parameter to retrieve the associ-
ated error message and SQLCODE value for a specific connection.
PARAMETERS
o $connection
- A connection resource associated with a connection that initially succeeded, but which over time became invalid.
RETURN VALUES
Returns a string containing the error message and SQLCODE value resulting from a failed connection attempt. If there is no error associ-
ated with the last connection attempt, db2_conn_errormsg(3) returns an empty string.
EXAMPLES
Example #1
Retrieving the error message returned by a failed connection attempt
The following example demonstrates how to return an error message and SQLCODE value after deliberately passing invalid parameters
to db2_connect(3).
<?php
$conn = db2_connect('badname', 'baduser', 'badpassword');
if (!$conn) {
print db2_conn_errormsg();
}
?>
The above example will output:
[IBM][CLI Driver] SQL1013N The database alias name
or database name "BADNAME" could not be found. SQLSTATE=42705
SQLCODE=-1013
SEE ALSO db2_conn_error(3), db2_connect(3), db2_stmt_error(3), db2_stmt_errormsg(3).
PHP Documentation Group DB2_CONN_ERRORMSG(3)