Home| Progetto| Web| Faq| Acronimi | ||||||||||||
Argomenti Documenti pubblicabili:1120
Scripts:1282 Documenti non pubblicabili:162 Categorie tematiche:68 .Net |_C# |_Visual basic.net |_Asp.net Active Server Pages C++ Cascade Style Sheet JavaScript Mysql Php Xml Java |_Java 2 Micro Edition |_Java server pages |_Java Servlet Oracle |_PLSQL PostgreSQL Unix
Oracle...
Info:
Ricavare lista oggetti modificati in un dato intervallo di tempo
Oracle...
Script:
Query to unlock all locked users
Unix...
Tip:
How remove a file named -r
PLSQL...
Script:
Inizialiazzazione e stampa variabili
Oracle...
Tip:
TWO_TASK
Oracle...
Faq:
Which chars in table and column names?
Shell scripting...
Script:
Determinare il numero di elementi di un array
A User Agent, like a web browser, uses HTTP to request a HTML document
Php Funzione mail()
In programming the danger of exploring the small details of coding is that you get obsessed with every line of code you write, thereby greatly reducing productivity.
In general, is not worth obsessing over code. On the other hand you should code with deliberation and intent. Steven Feurstein Oracle Magazine July /August 2004 A User Agent, like a web browser, uses HTTP to request a HTML document
|
Oracle
Home >Oracle > sqlldr and plsql function
Oracle loading utility sqlldr allows to check, manipulate or define Oracle events during data loading linking the insert action to a plsql function. This is a first trivial example to show code and syntax to execute a plsql function while loading data via sqlldr. You need
file addresses.dat: via latina 12; via pio XII 132; piazza alberone 1; boulevard saint michelle 123; 128 street 8/a; 1 West street 13; Sutton square 9; The destination table is very simple:
create table list_address (address varchar2(256));
Event the sqlldr control file is very simple but it calls the plsql function fun_assign_country. The code basically says when loading the ADDRESS field execute the function fun_assign_country passing to it the ADDRESS value: file load_address.ctl LOAD DATA INFILE addresses.dat APPEND INTO TABLE list_address FIELDS TERMINATED BY ';' (ADDRESS "fun_assign_country(:ADDRESS)") Here function fun_assign_country code (of course, must be compiled by the same Oracle schema that executes sqlldr: function fun_assign_country create or replace function fun_assign_country(ADDRESS in varchar2) return varchar2 AS vADDRESS varchar2(256); begin if lower(ADDRESS) like '%via %' or lower(ADDRESS) like '%piazza%' then vADDRESS:=ADDRESS || ' (ITALY)'; return vADDRESS; end if; if lower(ADDRESS) like '%street%' or lower(ADDRESS) like '%square%' then vADDRESS:=ADDRESS || ' (GREAT BRITAIN)'; return vADDRESS; end if; return ADDRESS; end fun_assign_country; / Tested on unix HP To check and enjoy the results:
SQL> select * from list_address;
Dott. Marco Magnani - senior DBA / developer. Indipendent consultant: Rome, Bruxelles,New York
Warning: include(ads/text468x15.html): failed to open stream: No such file or directory in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Warning: include(): Failed opening 'ads/text468x15.html' for inclusion (include_path='.;C:\php\pear') in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Tutorial ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Script ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Comandi ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Codici errore ![]() ![]() ![]() ![]() ![]() |
Cerca
Oracle...
Info:
Shared pool
Anger is creative, depression is useless.
Dyson, Freeman J. Anger is creative, depression is useless.
Dyson, Freeman J.
Oracle...
Info:
Which process register the listener services ?
Oracle...
Citazioni:
Designing an efficient Schema ...
Oracle...
Definizioni:
Schema
Oracle...
Definizioni:
Schema
Shell scripting...
Script:
while do loop
fishScript.Com is accessible by Mobile access technology
as mobile phones, Palm and Pocket PC .
Nicoleta e Marco Magnani tutorial, examples, courses, esempi, corsi, esercizi, appunti vari Dottoressa Nicoleta Dragu Formatrice Docente Insegnante Mediatrice Culturale Dott. Marco Magnani Universita La Sapienza Roma Master Computer Science Hunter College New York , Data Base Administrator DBA oracle System architect |