want to pass sqlplus row returned to a variable then evaluated.
#!/bin/bash
$ORAHOME/bin sqlplus "/ as sysdba" <<EOS
select count(*) from dual;
EOS
cvalue=$?
if [ $cvalue = 0 ] then
mail -s "zero rows were returned" groking@email.com
fi
Hello,
I have two directories and want to delete the top in a shell script.
2010_01_18
2010_01_20
I do an ls ls | head -n 1 which displays 2010_01_18, this is the directory I want to delete.
I try rm -rf < ls | head -n 1
I try ls | head -n 1 | rm -rf
neither deletes the directoy
I cant...
Hello,
I have an input file like this
1, "1,123", 10, 5
I need to remove the comma , which is between the double quotes so the data appears like "123", and newline looks like this
1, "123", 10, 5
any ideas??
thanks for the help!
Hello,
Trying to combine two not equals together where the combo is a set.
I am trying this in mysql 5.1 with wrong intended results.
select *
from ab_test
where ((test_name <> 'WinBuyer') and (isactive <> 'true'))
Results wanted
test_name 'George' and isactive 'true'
test_nmae 'Fred' and...
hello,
I would like to execute 2 stored procedures by calling both of them from the same Package. I would like to execute/run the Package in SqlPlus, actually a cron script. I think I can do this without needing a Package Body. I do not know how to declare the two Stored_Procedures which are...
SantaMufasa,
You have given me a present. That great if Oracle will convert form Varchar2 to Number on the procedure insert.
Then I don't need a trigger.
Thanks a bunch!
Yes that is good info but won't work here.
The problem is the stored_procedure is pulling the select from a non-oracle datasource "mysql 5.0" using HS service and mysql ODBC driver. Casting crashes the ODBC connection. And I can't change the source table to a different datatype.
I have a stored procedure that selects and inserts columns into a table. I have one column that I need to change the dataype from CHAR to_num before it inserts in the table because the table column is a number.
Rather than creating a temp table I thought I could use a trigger to convert it...
I have a column with datatype BIGINT which is a 64 bit unsigned, numeric. The actual length of the data is only 13 integers.
I am needing to convert BIGINT to INT(13) or to a string (CHAR) so that I can load it into another datebase.
The BIGINT comes through an ODBC as exponential, which is...
Is it possible to create a view and setting the datatypes and sizes you need rather than using the source table defaults.
This code did not work.
CREATE OR REPLACE FORCE VIEW "SYS"."NICHECOM_SITES3_VW" ("site_id" NUMBER(15), "site_name" VARCHAR2(55), "status" VARCHAR2(15)) AS
select...
Hello,
I have a csv file with several columns but I only want to keep 3 of them.
"me","you","you and me","nobody"
"me","you","you and me and nobody","nobody"
so I want to create a new file with just column 2 and 3 for instance. So 3 is a variable lenght.
any ideas would be helpful
I get this error message:
Error 1 'Public Property Left() As Integer' has no parameters and its return type cannot be indexed.
Dim s As String = campaignValue
Dim i As Integer
Dim newcamp as String
i = s.IndexOf("-") - 1
If i > 0 Then
newcamp = Left(s, i)
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.