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...
...without needing a Package Body. I do not know how to declare the two Stored_Procedures which are already compiled separately on the database.
***********************************
CREATE OR REPLACE PACKAGE "OWB_STAGE_LOAD2" IS
NICHECOM_TRAN_CRED_DAILYLOAD PROCEDURE
system_global_date DATE...
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
ok,
I have a file I am reading in and need to convert the string by keeping data to the left of the character without the space.
here is the campaignValue string = "house - content"
Dim newcamp As String
Dim newcamp1 As Integer
newcamp1 = InStr(campaignValue, "-")
If newcamp1 > 0 Then...
I have a column called NAMES with data that looks like this:
google
google - content
google
google - content
I need to run an update to remove the ' - content' from the column.
here is what I have so far.
UPDATE TABLE
SET COLUMN NAMES = DECODE(NAMES,' - CONTENT', '')
WHERE NAMES LIKE...
I have a table in access with strings like this in a text column.
I want to create a query that trims off the "http://www."
and everything to the right of ".com" leaving just "model.com". I know I need to use instr and mid to do this but not sure how to do it all in so I can append this to a...
Hello,
I have several access databases in a network folder, and each time a different user opens they receive an ODBC error. They must relink the tables and they are ok.
Then when the next person opens the datase, he must also relink the tables.
Is there a way to set up the ODBC/DSN to not...
Hello,
I am looking to use a data function in a access query to get data from the previous Monday, regardless of the current day of the week.
This does not work, it only pulls last thursday.
=IIf(Weekday(Date())=2,Date()-7,Date()-Weekday(Date())-2)
any ideas??
Thanks for the assistance!
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.