Unique constraint violated within stored procedure executed from Perl
Hi!
I got an strange trouble executing a stored procedures that goes inserting line by line on a table. I mus integrate it with perl for an specific task... the hole process is controlled by e Perl script that:
Load a text file calling sqlldr.
Call a stored procedure that process the uploaded data and insert into other table.
I developed the stored procedure on SQL Developer and when i run it there everything goes OK. But when i invoke it from Perl or SQL*Plus, i Got "unique constraint (ORANGE.PK_SEGMENT_RANKING_DATA) violated", but in my PL/SQL i handle that exception... my code:
More info: Mi primary key is made by the fields (ID_CUSTOMER, DATA_DATE, ID_CATEGORY).
Hi,
Can anyone help me with the correct syntax to call a MYSQL stored procedure from a shell script.
I have tried the following, (no input params):
/usr/bin/mysql -uadmin -ppassword call TL_CLENSEDATA();
resulting in error:
/home/hosting/data/scripts/dbclense.sh: line 12: syntax error... (3 Replies)
Hi GUYS,
I need to trigger 3 stored procedure at the same time..
I know how to trigger the stored procedure. If anybody can tell me how to trigger 3 different process at the same time parallelly.. that would be helpful..
Thanks for your help in advance,
Magesh (1 Reply)
Hi,
Can anyone please let me know where to check if a particular stored procedure exists.
If the procedure exists I want to display some message and if the procedure does not exists i want to exit with error message.
checking from dba_objects doesnt help. suprisingly the procedure i... (3 Replies)
Hi,
My stored procedure returns a value.
How to retrieve the value and display in unix.
Stored procedure
CREATE OR REPLACE
PROCEDURE gohan(num INT) IS
BEGIN
DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num);
END;
Unix Scripting i used
sqlplus -s... (7 Replies)
Hi,
I want to create MySQL stored procedure and call the stored procedure using perl.
I tried like this:
use DBI;
my $dbh = DBI->connect ("DBI:mysql:test",
"root", "ibab",
{ RaiseError => 1, PrintError => 0});
$create_procedure =... (5 Replies)
Hi,
I am looking for a script wherein i will be able to execute below procedures one by one in line and next procedures starts only when the previous one completes and also after execution of each procedure i will be getting a automted mail as "PL/SQL PROCEDURE SUCCESSFULLY EXCETUTED".
... (1 Reply)
below code is not executing the stored procedure,not sure what the issue.Even sqllog is blank.please help me its very urgent.
sqlplus -s $connect_str@$DB_ORACLE_SID >> ${SQL_LOG_FILE} << EOF
set serverout on
set feed off
set head off
set pages 0
set colsep ,
set tab off
set lin 150... (3 Replies)
Am trying to install a account script in oracle 8i and I keep getting ORA-00001: unique constraint violated as the screen shot below shows so am wondering how do i fix this i have posted the full code that is the issue.
i hope some one can help me, thanks a lot
http://www.livve.com/sqlbug.jpg... (2 Replies)
Discussion started by: Wpgn
2 Replies
LEARN ABOUT DEBIAN
sql::translator::schema::index
SQL::Translator::Schema::Index(3pm) User Contributed Perl Documentation SQL::Translator::Schema::Index(3pm)NAME
SQL::Translator::Schema::Index - SQL::Translator index object
SYNOPSIS
use SQL::Translator::Schema::Index;
my $index = SQL::Translator::Schema::Index->new(
name => 'foo',
fields => [ id ],
type => 'unique',
);
DESCRIPTION
"SQL::Translator::Schema::Index" is the index object.
Primary and unique keys are table constraints, not indices.
METHODS
new
Object constructor.
my $schema = SQL::Translator::Schema::Index->new;
fields
Gets and set the fields the index is on. Accepts a string, list or arrayref; returns an array or array reference. Will unique the field
names and keep them in order by the first occurrence of a field name.
$index->fields('id');
$index->fields('id', 'name');
$index->fields( 'id, name' );
$index->fields( [ 'id', 'name' ] );
$index->fields( qw[ id name ] );
my @fields = $index->fields;
is_valid
Determine whether the index is valid or not.
my $ok = $index->is_valid;
name
Get or set the index's name.
my $name = $index->name('foo');
options
Get or set the index's options (e.g., "using" or "where" for PG). Returns an array or array reference.
my @options = $index->options;
table
Get or set the index's table object.
my $table = $index->table;
type
Get or set the index's type.
my $type = $index->type('unique');
Get or set the index's type.
Currently there are only four acceptable types: UNIQUE, NORMAL, FULL_TEXT, and SPATIAL. The latter two might be MySQL-specific. While both
lowercase and uppercase types are acceptable input, this method returns the type in uppercase.
equals
Determines if this index is the same as another
my $isIdentical = $index1->equals( $index2 );
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
perl v5.14.2 2012-01-18 SQL::Translator::Schema::Index(3pm)