06-18-2009
oracle update not working
Hi,
I have a oracle source with a field my_date =06/02/2009
I am trying to update the table to SYSDATE with a myscript.sql where I have
UPDATE table set my_date=to_DATE(SYSDATE,'MM/DD/YYYY');
Now I try to run it with myupdate.SH script where I have
sqlplus nolog @myscript.sql
But here I have a peculiar problem when I run the script in oracle it updates the table but when I run with this script myupdate.SH it gives me a error not a valid month.
Is there any way I can solve this. or any way I can connect to my oracle table and update the date field to SYSDATE in mm/dd/yyyy format. Pls help.Thanks
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I would like to know how to update a table in Oracle database, if a command in one shell script either successfully completes or it fails.(like Y if its success or N if its a failure)
While the command is running,I am able to view the log file created in the Unix machine.After the command... (2 Replies)
Discussion started by: ann_124
2 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
Till now i was able to do apt-get update. but today i started to the following error:
# apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or directory)
E: Unable to lock the list directory
#
Could any one let me know how to solve it.
... (1 Reply)
Discussion started by: gauri
1 Replies
3. UNIX for Advanced & Expert Users
Dear All,
I have writen a Pro*c program that does a data base select,insert,update statements and I have scheduled the program to run from crontab,
It is runing fine for the select insert and commit statement till it reaches the update statement , it throws the following error:
SQL On IPB... (2 Replies)
Discussion started by: alhallay
2 Replies
4. Solaris
Hello
I reinstalled my OS today and after going through the registration the updatemanager pops up, as expected. The problem is all i get is an error message box that's completely blank.
The icon in the sytem tray is a blue question mark and when hovering over it, it says i'm not... (4 Replies)
Discussion started by: jpg.2009
4 Replies
5. Shell Programming and Scripting
I have data in a CSV file that looks like;
1353557880:1.111:123.3
1353557940:1.113:123.3
1353558000:1.118:123.3
1353558060:1.123:123.3
1353558120:1.218:123.3
I'm running the following;
while IFS=":" read d a b; do rrdtool update temp.rrd $d:$a:$b; done <temp6
It gives me the following... (2 Replies)
Discussion started by: ottsm
2 Replies
6. Shell Programming and Scripting
My Code is
get_week_date()
{
`sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF
SET ECHO OFF
SET FEEDBACK OFF
SET PAGES 0
SET SERVEROUTPUT ON
SET VERIFY OFF
SET TRIMSPOOL ON
(update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Discussion started by: karthick.cho
2 Replies
7. AIX
Situation:
AIX 7.1 various SP levels
Update to SP9 on DB systems with Oracle 10 or 11G
Steps:
Apply SP9 update
Bring down databases
shutdown -Fr
Check system health - AIX
Bring up databases
Confirm functionality
Would applying the update while the databases are up cause problems... (7 Replies)
Discussion started by: allenhibbert
7 Replies
LEARN ABOUT DEBIAN
sql::translator::parser::sqlite
SQL::Translator::Parser::SQLite(3pm) User Contributed Perl Documentation SQL::Translator::Parser::SQLite(3pm)
NAME
SQL::Translator::Parser::SQLite - parser for SQLite
SYNOPSIS
use SQL::Translator;
use SQL::Translator::Parser::SQLite;
my $translator = SQL::Translator->new;
$translator->parser("SQL::Translator::Parser::SQLite");
DESCRIPTION
This is a grammar for parsing CREATE statements for SQLite as described here:
http://www.sqlite.org/lang.html
CREATE INDEX
sql-statement ::=
CREATE [TEMP | TEMPORARY] [UNIQUE] INDEX index-name
ON [database-name .] table-name ( column-name [, column-name]* )
[ ON CONFLICT conflict-algorithm ]
column-name ::=
name [ ASC | DESC ]
CREATE TABLE
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name (
column-def [, column-def]*
[, constraint]*
)
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name AS select-statement
column-def ::=
name [type] [[CONSTRAINT name] column-constraint]*
type ::=
typename |
typename ( number ) |
typename ( number , number )
column-constraint ::=
NOT NULL [ conflict-clause ] |
PRIMARY KEY [sort-order] [ conflict-clause ] |
UNIQUE [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ] |
DEFAULT value
constraint ::=
PRIMARY KEY ( name [, name]* ) [ conflict-clause ]|
UNIQUE ( name [, name]* ) [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ]
conflict-clause ::=
ON CONFLICT conflict-algorithm
CREATE TRIGGER
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name [ BEFORE | AFTER ]
database-event ON [database-name .] table-name
trigger-action
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name INSTEAD OF
database-event ON [database-name .] view-name
trigger-action
database-event ::=
DELETE |
INSERT |
UPDATE |
UPDATE OF column-list
trigger-action ::=
[ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
BEGIN
trigger-step ; [ trigger-step ; ]*
END
trigger-step ::=
update-statement | insert-statement |
delete-statement | select-statement
CREATE VIEW
sql-command ::=
CREATE [TEMP | TEMPORARY] VIEW view-name AS select-statement
ON CONFLICT clause
conflict-clause ::=
ON CONFLICT conflict-algorithm
conflict-algorithm ::=
ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
expression
expr ::=
expr binary-op expr |
expr like-op expr |
unary-op expr |
( expr ) |
column-name |
table-name . column-name |
database-name . table-name . column-name |
literal-value |
function-name ( expr-list | * ) |
expr (+) |
expr ISNULL |
expr NOTNULL |
expr [NOT] BETWEEN expr AND expr |
expr [NOT] IN ( value-list ) |
expr [NOT] IN ( select-statement ) |
( select-statement ) |
CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END
like-op::=
LIKE | GLOB | NOT LIKE | NOT GLOB
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
SEE ALSO
perl(1), Parse::RecDescent, SQL::Translator::Schema.
perl v5.14.2 2012-01-18 SQL::Translator::Parser::SQLite(3pm)