How to create Maste Scrpt to call/execute another sql file
Hello
Can you please help me on below.
I have 10 different .sql file and wanted to run in a sequence of another .sql file. Need sample file I can send it back to create my file master sql to call anothere Stored proc or .sql to comiple.
as:
a.SQL
b.PRC
c.PKH
c.PKB
d.SQL
watnted to run these files from another .sql file, do I need to mention the path, if yes then how to define the path, the execution of another file. all sewage treatment.
forward, thanks in advance
Thank you
Rob
Hi, Rob.
885137 wrote:
Hello
Can you please help me on below.
I have 10 different .sql file and wanted to run in a sequence of another .sql file. Need sample file I can send it back to create my file master sql to call anothere Stored proc or .sql to comiple.
as:
a.SQL
b.PRC
c.PKH
c.PKB
d.SQL
watnted to run these files from another .sql file, do I need to mention the path, if yes then how to define the path, the execution of another file. all sewage treatment.
forward, thanks in advance
Thank you
Rob
To call SQL scripts from another SQL script, do the same thing you would do to call by typing on the command line. Put the @ symbol immediately before the name of the file:
@a
@b
@c
...
You don't need to say "@a.sql", ".sql" being the default value at the end of the file name. If you find that explicitly ".sql" in the script, it is clear, then, by all means, go ahead.
If you do not include a full path name, SQL * Plus assumes that they are in the default location.
If you use 2 @ signs, then SQL * Plus will assume the Sub-script is in the same folder (directory) as the main script running, so you can say
@@a
@@b
@@c
...
How to include a path depends on your operating system. In Windows, for example, you could say:
@d:\sql_scripts\sales\a
@d:\sql_scripts\research\b
...
Instead of the sign @, you can use the START command.
See the SQL * Plus manual to learn more:
https://docs.Oracle.com/database/121/SQPUG/ch_five.htm#sthref439
Tags: Database
Similar Questions
-
How can I create a button that will execute some SQL such as UPDATE, DELETE ststements
Hi all.
I'm new on ADF.
I start with this example from oracle
[http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html]
My question is how can I make a button that executes sql statements like "set 'name' = last_name employees where employee_id = 111; updated"
any hint will help you.
Thank youIf you are using JPA/EJB then you can write in your session bean method to access the EntityManager and using createNativeQuery to perform the update:
http://download.Oracle.com/docs/CD/E17477_01/JavaEE/5/API/javax/persistence/EntityManager.html#createNativeQuery (java.lang.String)
This method will be exposed in your ADF data control and you will be able to drag it to your page.If you use ADF BC then you can use the methods of service level AM:
See 9.7 to 9.9 in the Fusion developer's Guide:
http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/bcservices.htm#sm0206
http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/bcadvgen.htm#BABEIFAI -
How to create the constructor function for a pl/sql table?
I created a PL/SQL type as table below:
create or replace type typ_tbl_des_text is table of the typ_tof_des_text
OK so far, but I would like to have a constructor function which would be subject to validations and raise_application_error when a validation condition is not met.
How to do this?
The typ_tof_des_text that I created with a constructor function, so that the record-level validation are performed in the constructor. And I think the postings between several records shall be made in a constructor for typ_tbl_des_tex, but cannot figure out how to create such a constructor.
BEDE wrote:
So, if I have understood correctly, to a plsql table type, I can't have a member procedure. Or can I? I mean, just as for a type of failure I can have one or more constructors and possibly several procedures of Member.
For the standard tables in PL/SQL, you will need to create your own API (using procedures and functions) to handle beyond the basics provided by the language. No constructors and methods as it is no o - o.
After thinking a little deeper, I reformulate what I said earlier and actually wants to have a member procedure called add_item, who would be first to check if an item with a key value exists and, if so, it would be up-to-date and so not only extend the plsql table.
Two options.
As we already mentioned, an associative array can be considered - note however that this structure of table has name-value pairs.
Another method is to use a TWG (global temporary table). You define the structure of the once initial table. When a session uses the structure of the table, private copying is instantiated for this session. When the session ends, this copy is destroyed. The table is a temporary structure for this session only.
It can include indexes and so on – which means you can use the constraints of primary keys, unique indexes, secondary indexes and so on.
TWG scales are much better than collections or arrays that require a PGA (expensive private server) memory. In addition, SQL can be used natively against a GTT - unlike the arrays and collections.
-
How to create a new virtual machime of an existing file
Hello
I have the virtual machine Windows file server (file virtual disk of Windows Server 2008, Windows Server 2008 configuration,...), I ask is how to create a new virtual machine from this file.
post vmx file and a list of files
___________________________________
-
How to create Master records for my laptop Equium A200-15i
I recently bought a laptop Equium A200-15i. How can I create a CD/DVD Master can I use to restore my computer in the event of a major failure. I know all about the restoration of the machine of the hidden partition, but I want to get my hands on the DVD to use in case of a major failure of the system.
I took my computer to the local computer store to highlight the fact that ther were no Master DVD as part of the packing list and they seem not very useful. I bought a lot of computers before and normally those two things are provided to the user, or there is a facility for the user to create a. Thanks for your help.
null
Hello
Sorry to hear that, but I hope you can get the original DVD for your laptop. If the PC store will not help you please contact authorized partner in your country and explain the situation.
They can order one for you.
-
How to create and insert data with Execute Immediate?
Hi guys
Am stuck on a procedure of formatting in a package... script works okay however integrating a module turns out to be difficult!
Am not used to oracle... I have the script runs, but not in the package... Well not all that... Drop Table worked
CREATE or REPLACE PACKAGE BODY is
PROCEDURE DropTable1 IS
BEGIN
run immediately ("DROP TABLE mytable1");
END;
PROCEDURE PopulateTable1 IS
BEGIN
immediately execute ('CREATE TABLE mytable1 )
AS LONG AS)
Select
substr (T1.genarea, 3, 3) as M_Class,
substr (T1.genarea, 6, 30) as M_Description,
substr (T1.genarea, 36, 3) as M_Class,
substr (T1.genarea, 39, 30) as M_Description,
substr (T1. ItemItem, 1, 3) as product_code,.
T3. CHANNEL_NUM as SALES_CHANNEL,
to_date(''t2.time_id'',''dd-mon-yyyy'') as mis_date,
Sum (T2.ap_cw_cfi_irp + T2.ap_cw_issues_irp) as ap_gross,
sum (t2. Ap_Cw_Cfi_Irp + t2. Ap_Revivals_Irp) as ap_net,
Sum (T2.sp_inc_irp + T2.sp_issues_irp) as sp_gross,
Sum (T2.sp_dec_irp + T2.sp_fs_irp) as sp_net
Of
d_pr t1, t2 age_map t3 law
where
T1.pfx = "WE"and t1.coy ="1" and t1.tabl = "T81" and substr (t1.itemitem, 1, 3) = t2.product_id and t3. AGE_NUM = t2.age_id
Group
substr (T1.genarea, 3, 3),
substr (T1.genarea, 6, 30),
substr (T1.genarea, 36, 3),
substr (T1.genarea, 39, 30),
substr (T1. ItemItem, 1, 3).
T3. CHANNEL_NUM,
to_date(''t2.time_id'',''dd-mon-yyyy'')
)');
COMMIT;
END PopulateTable1;
END test;
/
Thank you
Hello
a few notes.
1. to_date(t2.time_id,'dd-mon-yyyy')
New York T2.Time_ID Cis the varchar2 data type that contains values to JJ-me-YYYY format?
And if, in which language is used for the names of the months? Conversions are point impossible to solve in reasonable time limits without logging of dml errors and unique failure on charges of staging nightly!
2 single quote escaping "alternative in string literals.You can use Q or q to escape single quotes in strings.
http://docs.Oracle.com/database/121/SQLRF/sql_elements003.htm#SQLRF00218
3. validation
Not required because the DDL commands commit implied.
In general I recommend you write commit clauses only in calling script rather than in the code unless it connects with an autonomous transaction.
You end up with a lot of validation of code here and there and you don't know where it is and where it isn't. That is, your process may have more than one appeal process and commit the middle of the process, it is not atomic processes.
Here's the demo although I recommend also using the static table and truncate to efficiency. ETG is good choice for the purpose of maintenance table.
create or replace package testing is procedure staging_one; end; / create or replace package body testing is -- procedure staging_one is -- procedure drop_staging_one is table_does_not_exist exception; pragma exception_init(table_does_not_exist, -00942); begin execute immediate q'{ drop table staging_one purge }'; exception when table_does_not_exist then return; -- fine end; -- procedure create_staging_one is begin execute immediate q'{ -- remove >>> create table staging_one nologging as select * from dual -- <<< remove /* uncomment >>> create table staging_one nologging as select substr(t1.genarea,3,3) as m_class, substr(t1.genarea,6,30) as m_description, substr(t1.genarea,36,3) as m_class, substr(t1.genarea,39,30) as m_description, substr(t1.itemitem,1,3) as product_code, t3.channel_num as sales_channel, to_date(t2.time_id,'dd-mon-yyyy') as mis_date, sum(t2.ap_cw_cfi_irp+t2.ap_cw_issues_irp) as ap_gross, sum(t2.ap_cw_cfi_irp+t2.ap_revivals_irp) as ap_net, sum(t2.sp_inc_irp +t2.sp_issues_irp) as sp_gross, sum(t2.sp_dec_irp +t2.sp_fs_irp) as sp_net from d_pr t1, act t2, age_map t3 where t1.pfx = 'IT' and t1.coy = '1' and t1.tabl = 'T81' and substr(t1.itemitem,1,3) = t2.product_id and t3.age_num = t2.age_id group by substr(t1.genarea,3,3), substr(t1.genarea,6,30), substr(t1.genarea,36,3), substr(t1.genarea,39,30), substr(t1.itemitem,1,3), t3.channel_num, to_date(t2.time_id,'dd-mon-yyyy') <<< uncomment */ }'; -- end; -- main begin drop_staging_one; create_staging_one; end; end; / set serveroutput on exec testing.staging_one; select * from staging_one ; commit ; PACKAGE TESTING compiled PACKAGE BODY TESTING compiled anonymous block completed DUMMY ----- X committed.
-
Qosmio G40: How to create master disc for Windows Vista?
Hi all
I'm looking forward to install additional Windows XP to Windows Vista on my QOSMIO G40 (dual boot).
Before this trip, I need a little more secure the folder in the path by creating a * master disc * I can boot from the Vista loading.
I speak not re-installing Vista from reinstall drive but a master drive.Someone to help me with this?
I don't know what you mean when you say "the Master disc. Do you mean a diskette that has Vista boot, loading files?
EasyBCD can help you set up dual-boot configuration.
http://NeoSmart.NET/DL.php?id=1 -
"How to create Master Pages of the company for Acrobat Forms.
I need to create a Master Page using Acrobat DC for use with all our company forms a project of standardization of standard. Where can I find information on creating custom Master Pages?
Acrobat forms is not master pages. Forms created by LiveCycle Designer have master pages.
-
How to close the popup window after executing PL/SQL?
Hello
To see a junior question: we use APEX 5.0.2
On a page of the modal dialog (of an interactive report), for the button create, I created a dynamic action that runs the specific code from PL/SQL to insert a new item. Then behind the insert clause, I have the code to close the pop-up window, so that it executes successfully the insert clause without closing the window. Please let me know what I can do. Thank you.
HTP.p ("< script > '");
HTP.p ('window.opener.Location.Reload ();) Window.Close ();') ;
HTP.p ("< /script >" ");
Kind regards
Jian
OK, thanks for all your help and ideas. Finally, I gave up running JavaScript, instead, I created another dynamic action that closes the dialog box with a later sequence (for example, it runs after the PL/SQL code). Now, it closes the windows properly after running pl/sql clause. Although I still wonder how to run JavaScript because it doesn't do anything, even when I create a process to run javascript directly.
-
How to create the project with mutibple workflow (several BPEL files)
Hi all
I am newbie with Oracle BPEL. Now, I need to create a project with a lot of process (I mean a lot of .bpel files). So, how should I do. I see in JDeveloper, I only create a .bpel file in a project.
Can someone help me?
Thanks in advance
NguyenYou can call several BPEL processes in the BPEL process. He will not however be a project. You will need to deploy the BPEL processes to the BPEL process family school and work.
You say that you have a starting point. You should be able to achieve this with N flows, but another method would be to put a BSE on the front and the payload can call other BPEL processes.
see you soon
James -
How to create a process to redirect to another page?
Hi all
I have a selection list, and when I select a value from this list, I want to redirect to another page. This means that I need to create a process, but I don't know how to write it, please help me!
Hello
Selection list can also submit the page and redirect to the page.
Page under settings attribute selection list Action when the value is modified.
If you submit the page, you can then create for example a branch that brings you to the target page.
Kind regards
Jari -
How to create a library of shades from several png files?
Illustrator CC
I'm having a hard time trying to create a new shade of several png files template library. The way I do it is very slow and repetitive and seems ridiculous for a tool that is as advanced as the last consequence CC including illustrator.
It seems that I have to do is open all png files in Illustrator, create multiple workspaces, drag a png file in the swatch window, and then save this window as a library, close the existing window to reveal the next png file, open the user's library, I just created, drag the following image in the currently active window swatch and then drag the previous swatch/s of the library of the user in the active window current swatch, re-record and replace the shades defined the user library (now with two images in it) in the update of current active swatch Panel / window, close the existing workspace to display the next file image and then repeat the process again slowly accumulate shades defined the user library by adding an image at the same time then in the Swatch Panel library previously accumulated shades again one in time. (you can select all from the library defined by the existing user and drag it above in swatch window, but this creates at least a copy at each cycle for as soon as you click on the first sample in the library, he adds ITTO the current swatch group and then when you select the nuances of slip through it includes the first shade and still once copy)
It is a very slow process to put in place a swatch library. For some reason you can't drag samples directly into the user defined library you created, only in the window active swatch for each workspace. I searched the web and the forums for answers, but could find none. There must be an easier way, just can't find it.
Ideally, the best option would be a swatch window option that allows importing directly in a list of files selected in the finder.
Any ideas out there?
Thank you
I can see how to work with it.
I opens the library file, drag other png files open on the sheet of library file, and then drag the images into the swatch window.
Not exactly intuitive at first, especially the files are hidden, but it works.
Thanks again
-
How to create the same folder inside the 200 other files?
I have 200 users access my OS X Server with access only to their protected folder name and password of the user. Often, I need to put an empty folder with the same name in all 200 of its files to the user. I have not found a way to automate this process and therefore am stuck copying and pasting then individually in their records. It's quicker than you think, but a major nuisance.
Is there a way I can automate this chore?
Thank you
Two approaches: (a) use a script which takes a list of user names that you have provided and creates directories using mkdir, chmod, chown, etc. (b) change the template used to configure folders of welcome for new users. Who have you had in mind?
C.
-
How to create a Windows XP USB Bootable Disk with file .iso Windows?
I have a notebook without DVD ROM. I have to restart my notebook with usb drive. I don't know how to make my empty usb drive bootable. I already have an .iso windows image file?
See: make Bootable to Windows XP CD install updated with SP3
-
How to create a custom action to split a PDF file into multiple pages in Acrobat DC?
I can create a new action to 'organise pages', but I don't see any way to specify sharing options. (Being a member of the subgroup Split Pages organize in the section main tools...)
Use JavaScript to the Acrobat SDK sample script below. Note You must change the cPath to a directory on your hard drive (by c/example/folder Action / is equivalent to the path on your drive hard "C:\Action Folder").
/ * Extract pages to the file * /.
// Regular expression used to acquire the base name of file
var re = /\.pdf$/i;
// filename is the base name of the file Acrobat is working on
var filename = this.documentFileName.replace(re,"");
try {for (var i = 0; i < this.numPages; i++)
this.extractPages({
nStart: i,
cPath: "/F/temp/"+filename+"_" + i +".pdf"
});
} catch (e) { console.println("Aborted: " + e) }
Maybe you are looking for
-
Foxtabs does not. Using firefox 23.0.1. Vista Home Premium
When I open a new tab I get a vacuum and my foxtabs are gone, I want to say foxtabs does not work.What can I do? Please, please help. I use firefox 23 and foxtabs 1.4.9. Windows vista Home premium.
-
VeriStand 2015 honor assignment processor PCL
By using a PXI-8110 and NI Veristand 2015, no matter what I put the assignment of processor PCL to in the system definition, the PCL always land on the CPU 0. I can confirm it with the CPU load monitor and a backtrace (attached). The data processing
-
How to run a while loop continuously without iterate loop inside the fi, a condition is met
I enclose a VI that once the answer 28 comes the loop must stop and loop should continue an iteration. Can you show me a way for her
-
I went to put in a cd to look and he wanted to get on-screen computor Ive seen it before, but for some reason any it stoped working. I went on a local drive Q and click with the right button to open it, but then it reads that q:\ is not accessible. a
-
Do you have anyone know where I can find patterns for video presentations like this: http://www.facebook.com/photo.php?v=437832222944631&set=vb.289003064494215&type=3&theater (as the film strip). Thank you