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...
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
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!
Hello,
I have a VB.NET program that converts an XML file to CSV.
When I try to import the CSV into Oracle or even Access it chokes on the first row, but does import the remaining rows into a table.
It seems there is a type conversion character in position column 1,row 1, that is not visible...
I have an MS Access database 2003 and am sending a query with date parameters (date/time)using mysql 3.51 ODBC driver. Since I have 9 queries that run with a Macro and all use the same date range, I put the start and end dates in an Access table and join it in to each query.
The problem, I...
I have a two child forms loaded on a MDI form. I click the first to start running the code and it works fine. But when I try to click on the second to run the sub main nothing happens.
Can I have two child forms loaded and running at the same time.
I also am using database connections on each...
Hello all,
I am having some trouble passing a recordset to a sub. I want to pass the recordset to Sub Patient, then pass the string PAT back up and write out the results, then loop through the recordset and do the same for all rows. I can do this if I list each datafield in the Call Patient ()...
Hello all,
I am having some trouble passing a recordset to a sub. I want to pass the recordset to Sub Patient, then pass the string PAT back up and write out the results, then loop through the recordset and do the same for all rows. I can do this if I list each datafield in the Call Patient ()...
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.