Proper downgrade procedure from 7.1 to 7.0?
Motherboard died on lab machine running LabVIEW 7.0 vi. I built new machine, reinstalled all hardware and mistakenly installed 7.1 instead of 7.0, not realizing that driver/dll issues would prevent old VI from running. So, now I want to install 7.0.
Do I need to completely uninstall 7.1 and all ni*.* drivers from windows/system32/ first? Or can I just install into a separate directory and have both versions on the system at the same time?
Thanks!
You can install 7.0 side by side with 7.1. If you want to use the drivers (DAQmx, NI-VISA, etc) that came with 7.0, then you would have to first uninstall the drivers you installed with 7.1.
Exactly what kind of issues are you having with 7.1. The upgrade is generally painless.
Similar Messages
-
Proper upgrade procedure from 2007 - 2013 with Fab 40 templates
I'm currently migrating my MOSS 2007 server to 2013 I have gone through all steps to detach and upgrade to 2013 within my test environment, started by migrating to 2010 then from 2010 to 2013 which I was able to get the sites functional however I'm running
into some problem with solutions that are no longer available for 2010 and 2013 sharepoint sites.
My existing 2007 server was based on the FAB40 templates and when I upgrade I have some problems where the templates are not found and I end up with some Correlation ID errors on a particular sub site which I'm having a hard time resolving because of missing
solutions and I'm not able to access that site. I'm also seeing various errors where I'm missing templates when I run the 2013 health check so I'm trying to figure out what is the best approach to resolve these issues before I perform the migration? I have
to keep the 2007 server in production until the migration is complete so I can't just uninstall the solutions from the exiting site.
How are people handling the FAB40 template problems?
Missing Site Templates
The following sites are using templates that are not yet supported after upgrade:
http://tagsp01/admin/admin/vacation - #0
http://tagsp01/admin/confroom - #0
http://tagsp01/admin/finreport - #0
http://tagsp01/cows - #0
http://tagsp01/finance/expenses - #0
http://tagsp01/helpdesk - #0
http://tagsp01/hr/jobs - #0
http://tagsp01/is/development/bugtracking - #0
http://tagsp01/is/sysadmin/asset_tracking - #0
http://tagsp01/is/sysadmin/callcenter - #0
http://tagsp01/is/sysadmin/kb - #0I just wanted to elaborate on what Aries said, since I had the same issue regarding missing site templates occurring during the site collection upgrade health check.
I had noted that the solution package that my site templates came from were installed in the 14 hive, but not in the 15 hive. So, after seeing this blog entry, it became clear that I would have to install the site templates to the 15 hive to get rid
of the missing site templates issue during the upgrade health check.
The following blog explains what happens when a solution package is installed.
http://blogs.technet.com/b/mspfe/archive/2013/02/04/planning-deployment-of-farm-solutions-for-sharepoint-2013.aspx
As of the writing of the blog, to install the solution package to both hives, you must install the solution package using the Install-SPSolution command with the CompatibilityLevel option set to {14,15}. Otherwise, unless specified in the solution
manifest.xml file, the solution will be installed into the 14 hive for backward compatibility.
You would add the solution using the standard:
stsadm -o addsolution -file "WebPartSolution.wsp"
If you already added and deployed it the stsadm way, you can retract the solution using stsadm -o retractsolution and then deploy it again using the Install-SPSolution command with the compatibility level specified to {14,15}.
The Install-SPSolution command I used utilized the following options:
Install-SPSolution -Identity "WebpartSolution.wsp" -GACDeployment -force -CompatibilityLevel {14,15} -WebApplication
http://moss2013URL
Doing this got rid of the missing site templates error for me and allowed me to proceed with the SiteCollection upgrade.
I will probably have to make modifications to my site templates and make a 2013 version of my solution packages. However, during the initial upgrade of my farm to 2013, this will at least give me a chance to see how the site template
looks in 2013 mode. -
Performance differce calling Procedure from sqlplus and Java
Hi ,
I have one procedure which is called from java application and its called only once from java and the entire process is running from procedure itself.Once its called there is no dependency from java to PL/SQL.Its taking long time from java.But if I execute the same procedure from SQL plus then its running in seconds.Also only one session is running in entire database.
My Oracle version 11g.
Please guide me if you get some thing based on below session event.
This is the session status for running from SQL plus
SID EVENT TOTAL_WAITS TOTAL_TIMEOUTS TIME_WAITED WAIT_CLASS
2191 SQL*Net message from client 954 0 1319633 Idle
2191 direct path read 860 0 702 User I/O
2191 db file sequential read 2605 0 550 User I/O
2191 SQL*Net break/reset to client 24 0 460 Application
2191 SQL*Net more data from client 3 0 159 Network
2191 direct path write temp 214 0 74 User I/O
2191 direct path read temp 314 0 67 User I/O
2191 db file scattered read 78 0 42 User I/O
2191 db file parallel read 71 0 21 User I/O
2191 log file sync 36 0 12 Commit
2191 SQL*Net message to client 955 0 0 Network
2191 Disk file operations I/O 8 0 0 User I/O
2191 events in waitclass Other 15 7 0 Other
This is the session status for running from Java
SID EVENT TOTAL_WAITS TIME_WAITED WAIT_CLASS
1718 SQL*Net message from client 21208 7046039 Idle
1718 direct path read 2742 2327 User I/O
1718 log file sync 3748 1121 Commit
1718 db file sequential read 1533 1082 User I/O
1718 enq: TX - row lock contention 6 423 Application
1718 buffer busy waits 1 100 Concurrency
1718 log buffer space 1 30 Configuration
1718 direct path write temp 92 21 User I/O
1718 direct path read temp 138 16 User I/O
1718 log file switch (private strand flush incomplete) 6 16 Configuration
1718 SQL*Net message to client 21209 2 Network
1718 db file scattered read 2 1 User I/O
1718 SQL*Net more data from client 17 0 Network
1718 Disk file operations I/O 11 0 User I/O
1718 SQL*Net more data to client 1 0 Network
1718 events in waitclass Other 15 0 Other
Sorry I am not able to paste in proper alignment for my plain text.Hi,
you need to find which SQL is running slower, using some tools as dbms_profiler, dbms_hprof, ASH, extended SQL trace and real-time SQL monitor (caution: some of the tools may require Diagnostic Pack License).
Then you need to pinpoint difference in the plans and understand its origin -- post plans here if you need help with that (use tags to preserve formatting).
Best regards,
Nikolay -
Call procedure from another procedure
Hi All,
I have a requirement to call a procedure from another procedure and don't want to return to the main procedure again.please suggest me how to achive this .
thanksuser13424229 wrote:
I have a requirement to call a procedure from another procedure and don't want to return to the main procedure again.please suggest me how to achive this .A very strange requirement.. that perhaps you should expand on in order to get proper technical input and advice from forum members.
Assuming a valid requirement, it should be implemented in the following way:
SQL> create or replace procedure ProcB is
2 begin
3 DBMS_OUTPUT.put_line( 'ProcB(): executing...' );
4 end;
5 /
Procedure created.
SQL>
SQL>
SQL>
SQL> create or replace procedure ProcA is
2 E_CEASE_PROCESSING exception;
3 pragma exception_init(E_CEASE_PROCESSING, -20000 );
4 begin
5 DBMS_OUTPUT.put_line( 'ProcA(): executing...' );
6 DBMS_OUTPUT.put_line( 'ProcA(): doing stuff 1...' );
7 raise E_CEASE_PROCESSING; --// typically a conditional instruction
8 DBMS_OUTPUT.put_line( 'ProcA(): doing stuff 2...' );
9
10 exception when E_CEASE_PROCESSING then
11 ProcB;
12 end;
13 /
Procedure created.
SQL>
SQL>
SQL> exec ProcA
ProcA(): executing...
ProcA(): doing stuff 1...
ProcB(): executing...
PL/SQL procedure successfully completed.
SQL> -
Error while executing a stored procedure from forms6i
When I execute a STORED PROCEDURE from ORACLE DB 10g this procedure works perfectly fine.
But when I execute the same from the FORMs 6i I get the following error:
PDE-PLU022 Don't have access to the stored program unit
XMLPARSERCOVER in schema CARE.
where XMLPARSERCOVER is the class and
CARE is the schema.
Regards,
Jignesh SI have tried this with both the owner of the schema and the intended user, -from both forms and directly.
All rights was granted on the stored procedure. Since posting I have found that one of the tables that the procedure might insert into, was not explicitly granted to the intended user, and after rectifying that the error message went away.
-however, the procedure now silently "finishes" without any evidence that it ever ran, if invoked from the forms application. When invoked from SQL Plus (or JDev, or Toad) it runs as expected.
I have no public synonym for the procedure, -is that necessary?
The stored procedure in question is implemented in java, and published as a stored procedure. It does rather heavy lifting, when running, using a view against another server , updating local tables and quite a lot of data validation/cleansing, and logging. All recourses are within the same schema.
Any ideas? -
Error while calling a procedure from ESB
Hi,
I am calling a procedure from ESB using DB adapter. and in the routing rules i am mapping the i/p values for schema to procedure input variables using mappings(transformation) but the values are going as null to the procedure call.
Please help me out.
The exception follows...
An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/ESB-Issues_issue3/db3.wsdl [ db3_ptt::db3(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'db3' failed due to: Error while trying to prepare and execute an API.
An error occurred while preparing and executing the SYSTEM.INSERT_ISSUE_PROC API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16
ORA-06512: at line 1
[Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."ISSUES"."ISSUE_NAME")
ORA-06512: at "SYSTEM.INSERT_ISSUE_PROC", line 16This is likely being caused by a problem that we've seen a number of times. You'll have namespace issues and problems with NULLs if your JDev is 10.1.3.1 and SOA is 10.1.3.3 (or vice-versa). You MUST synchronize JDev 10.1.3.3 (or higher) with SOA 10.1.3.3 (or higher). It doesn't matter if you mix 10.1.3.3 and 10.1.3.4. You just need to get away from 10.1.3.1.
-
How to call a PL/SQL procedure from a Java class?
Hi,
I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
Can anyone let me know how to solve that problem?
Thanks in advance,
Chang Si ChouHave a look at this example:
final ApplicationModule am = panelBinding.getApplicationModule();
try
final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
stmt.registerOutParameter(1, OracleTypes.VARCHAR);
stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
stmt.setString(3, "Test");
stmt.execute();
stmt.close();
return stmt.getString(1);
catch (Exception ex)
panelBinding.reportException(ex);
return null;
}Hope This Helps -
How to call a PL/SQL procedure from a xml Data Template
We have a requirement in which we need to call a pl/sql package.(dot)procedure from a Data Template of XML Publisher.
we have registered a Data Template & a RTF Template in the XML Publisher Responsibility in the Oracle 11.5.10 instance(Front End).
In the Data Query part of the Data Template , we have to get the data from a Custom View.
This view needs to be populated by a PL/SQL procedure.And this procedure needs to be called from this Data Template only.
Can anybody suggest the solution.
Thanks,
SachinCall the procecure in the After Parameter Form trigger, which can be scripted in the Data Template.
BTW, there is a specialized XML Publisher forum:
BI Publisher -
PL/SQL: Executing a procedure from within another procedure
Hello, I'm a newbie and I need help on how to execute procedures from within another procedure. The procedure that I call from within the procedure have return values that I want to check.
I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
but I get the error message:
PLS-00103: Encountered the symbol "USER_GET_FORUM_INFO" when expecting one of the following::= . ( @ % ; immediate
The symbol ":=" was substituted for "USER_GET_FORUM_INFO" to continue.
And when I tried: EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
I get the error message:
PLS-00222: no function with name 'USER_GET_FORUM_INFO' exists in this scope
PL/SQL: Statement ignored
The procedure USER_GET_FORUM_INFO exists. (don't understand why it says "no FUNCTION with name", it's a procedure I'm executing)
I'm stuck so thanks for any help...
Below is all the code. I'm using Oracle 9i on RedHat Linux 7.3.
================================================================================
CREATE OR REPLACE PROCEDURE user_forum_requestsaccess (
p_forumid IN NUMBER,
p_requestmessage IN VARCHAR2
AS
var_forumid NUMBER;
var_forum_exists NUMBER;
var_forum_access NUMBER;
request_exists NUMBER;
var_forumname VARCHAR2(30);
FORUM_DOESNT_EXIST EXCEPTION;
FORUM_USER_HAS_ACCESS EXCEPTION;
FORUM_REQUEST_EXIST EXCEPTION;
BEGIN
SELECT SIGN(NVL((SELECT request_id FROM forum.vw_all_forum_requests WHERE forum_id = p_forumid AND db_user = user),0)) INTO request_exists FROM DUAL;
EXECUTE(user_get_forum_info(p_forumid, var_forum_exists, var_forum_access, var_forumname));
IF var_forum_exists = 0 THEN
RAISE FORUM_DOESNT_EXIST;
ELSIF var_forum_access = 1 THEN
RAISE FORUM_USER_HAS_ACCESS;
ELSIF request_exists = 1 THEN
RAISE FORUM_REQUEST_EXIST;
ELSE
INSERT INTO tbl_forum_requests VALUES (SEQ_TBL_FORUM_REQ_REQ_ID.NEXTVAL, SYSDATE, p_requestmessage, p_forumid, user);
INSERT INTO tbl_forum_eventlog VALUES (SEQ_TBL_FORUM_EVNTLOG_EVNT_ID.NEXTVAL,SYSDATE,1,'User ' || user || ' requested access to forum ' || var_forumname || '.', p_forumid,user);
COMMIT;
END IF;
EXCEPTION
WHEN
FORUM_DOESNT_EXIST
THEN RAISE_APPLICATION_ERROR(-20003,'Forum doesnt exist.');
WHEN
FORUM_USER_HAS_ACCESS
THEN RAISE_APPLICATION_ERROR(-20004,'User already have access to this forum.');
WHEN
FORUM_REQUEST_EXIST
THEN RAISE_APPLICATION_ERROR(-20005,'A request to this forum already exist.');
END;
GRANT EXECUTE ON user_forum_requestsaccess TO forum_user;
================================================================================
Regards Goranyou don't have to use execute when you want to execute a procedure (only on sql*plus, you would use it)
just give the name of the funtion
create or replace procedure test
as
begin
dbms_output.put_line('this is the procedure test');
end test;
create or replace procedure call_test
as
begin
dbms_output.put_line('this is the procedure call_test going to execute the procedure test');
test;
end call_test;
begin
dbms_output.put_line('this is an anonymous block calling the procedure call_test');
call_test;
end;
/ -
Unable to call a procedure from inside a another procedure
Dear members
I am trying to call a procedure from inside an another procedure.Both the procedures are present within the same package.I am trying to call the second procedure just before the end of the first procedure.Both the procedures are compiling fine but the tables are not getting populated inside the second procedure.Also the DBMS_OUTPUT statements present in second procedures are not getting displayed.(I feel the second procedured is not getting called).
The package specification is as follows:
CREATE OR REPLACE package ANVESH.conv_api_pkg
is
PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2) ;
TYPE cts_order_details IS TABLE OF XXCTS_ORDER_DETAILS_STG%ROWTYPE;
PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details) ;
end conv_api_pkg;The package body is as follows:
CREATE OR REPLACE package body ANVESH.conv_api_pkg
is
PROCEDURE PROC_CONVERSION_API(FILE_PATH IN VARCHAR2,FILE_NAME IN VARCHAR2)
IS
v_file_type utl_file.file_type;
v_buffer VARCHAR2(1000);
V_CUSTOMER_NAME VARCHAR2(100);
V_MANUFACTURER VARCHAR2(100);
V_PRODUCT_NAME VARCHAR2(100);
V_QUANTITY NUMBER;
V_REQ_SHIP_DATE DATE;
V_REQ_PRICE NUMBER;
V_LOG_FILE utl_file.file_type;
V_COUNT_CUST NUMBER;
V_COUNT_PROD NUMBER;
L_ORDER_LINES CONV_API_PKG.cts_order_details:=CONV_API_PKG.cts_order_details();
BEGIN
DBMS_OUTPUT.PUT_LINE('Inside begin 1');
v_file_type := UTL_FILE.fopen(FILE_PATH, FILE_NAME, 'r',null);
DBMS_OUTPUT.PUT_LINE('Inside begin 1.1');
LOOP
BEGIN
DBMS_OUTPUT.PUT_LINE('Inside begin 2');
UTL_FILE.GET_LINE (v_file_type,v_buffer);
DBMS_OUTPUT.PUT_LINE('Inside begin 2.1');
DBMS_OUTPUT.PUT_LINE('the buffer is '||v_buffer);
DBMS_OUTPUT.PUT_LINE('the length of buffer is '||length(v_buffer));
V_CUSTOMER_NAME := trim(substr(v_buffer, 1, 30));
DBMS_OUTPUT.PUT_LINE('Customer Name is '||V_CUSTOMER_NAME);
V_MANUFACTURER := trim(substr(v_buffer, 31, 40));
DBMS_OUTPUT.PUT_LINE('Manufacturer is '||V_MANUFACTURER);
V_PRODUCT_NAME := trim(substr(v_buffer, 71, 20));
DBMS_OUTPUT.PUT_LINE('Product Name is '||V_PRODUCT_NAME);
V_QUANTITY := to_number(trim(substr(v_buffer, 91, 5)));
DBMS_OUTPUT.PUT_LINE('Quantity is '||V_QUANTITY);
V_REQ_SHIP_DATE := to_date(trim(substr(v_buffer, 96, 20)), 'DD-MON-YYYY');
DBMS_OUTPUT.PUT_LINE('Requested Ship Date is '|| V_REQ_SHIP_DATE);
V_REQ_PRICE :=nvl(substr( trim(v_buffer), 116, length(v_buffer)-116),0);
--DBMS_OUTPUT.PUT_LINE('Requested Price is1 '||substr(v_buffer, 116, 5));
DBMS_OUTPUT.PUT_LINE('The requested price is '||V_REQ_PRICE);
V_LOG_FILE := UTL_FILE.FOPEN(FILE_PATH, 'LOG_FILE.dat', 'A');
IF (V_QUANTITY > 0)
THEN
DBMS_OUTPUT.PUT_LINE('The quantity is '||V_QUANTITY);
SELECT COUNT (*)
INTO V_COUNT_CUST
FROM CONVERSION_CUSTOMERS
WHERE CUSTOMER_NAME = V_CUSTOMER_NAME;
DBMS_OUTPUT.PUT_LINE('The Customer count is '||V_COUNT_CUST);
IF(V_COUNT_CUST > 0)
THEN
SELECT COUNT(*)
INTO V_COUNT_PROD
FROM conversion_products
WHERE PRODUCT_NAME = V_PRODUCT_NAME;
DBMS_OUTPUT.PUT_LINE('The Product count is '||V_COUNT_PROD);
IF(V_COUNT_PROD >0)
THEN
INSERT INTO XXCTS_ORDER_DETAILS_STG VALUES (V_CUSTOMER_NAME, V_PRODUCT_NAME, V_MANUFACTURER, V_QUANTITY, V_REQ_SHIP_DATE, V_REQ_PRICE, 'ACTIVE', 'ORDER TAKEN');
ELSE
DBMS_OUTPUT.PUT_LINE('PRODUCT SHOULD BE VALID');
UTL_FILE.PUT_LINE(V_LOG_FILE, 'PRODUCT SHOULD BE VALID');
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE('CUSTOMER SHOULD BE VALID');
UTL_FILE.PUT_LINE(V_LOG_FILE, 'CUSTOMER SHOULD BE VALID');
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE('QUANTITY SHOULD BE VALID');
UTL_FILE.PUT_LINE(V_LOG_FILE, 'QUANTITY SHOULD BE VALID');
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
END;
END LOOP;
SELECT CUSTOMER_NAME, PRODUCT_NAME, MANUFACTURER, QUANTITY, REQUESTED_SHIP_DATE, REQUESTED_PRICE, STATUS,MESSAGE
BULK COLLECT
INTO L_ORDER_LINES
FROM XXCTS_ORDER_DETAILS_STG;
DBMS_OUTPUT.PUT_LINE('values inserted');
proc_conversion_api2(p_orderdetails=>L_ORDER_LINES);
END;
PROCEDURE proc_conversion_api2(p_orderdetails IN cts_order_details)
IS
V_AVL_QUANTITY CONVERSION_PRODUCTS.AVL_QUANTITY%TYPE;
V_REQ_SHIP_DATE DATE;
V_LIST_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
V_NET_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
V_NET CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
V_EXTN_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
V_CUST_DISC CONVERSION_CUSTOMERS.DISCOUNT%TYPE;
V_CERT_DISC CONVERSION_CERTIFICATION.DISCOUNT%TYPE;
V_CUST_ID XXCTS_ORDER_DETAILS.CUSTOMER_ID%TYPE;
V_PROD_ID XXCTS_ORDER_DETAILS.PRODUCT_ID%TYPE;
V_DISC_PRICE CONVERSION_PRODUCTS.LIST_PRICE%TYPE;
V_DISC_NAME CONVERSION_CERTIFICATION.CERTIFICATION%TYPE;
V_TOTAL_DISC_AMT NUMBER;
V_TOTAL_DISC NUMBER;
V_LIMIT NUMBER;
BEGIN
DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 1');
FOR i IN p_orderdetails.FIRST..p_orderdetails.LAST
LOOP
BEGIN
DBMS_OUTPUT.PUT_LINE('INSIDE API_2 BEGIN 2');
SELECT PRODUCT_ID,AVL_QUANTITY,LIST_PRICE
INTO V_PROD_ID,V_AVL_QUANTITY,V_LIST_PRICE
FROM CONVERSION_PRODUCTS
WHERE PRODUCT_NAME=p_orderdetails(i).PRODUCT_NAME;
DBMS_OUTPUT.PUT_LINE('PRODUCT QUANTITY is '||V_PROD_ID);
DBMS_OUTPUT.PUT_LINE('AVAILABLE QUANTITY is '||V_AVL_QUANTITY);
DBMS_OUTPUT.PUT_LINE('LIST PRICE is '||V_LIST_PRICE);
SELECT CUSTOMER_ID,NVL(DISCOUNT,0)
INTO V_CUST_ID,V_CUST_DISC
FROM CONVERSION_CUSTOMERS
WHERE CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
DBMS_OUTPUT.PUT_LINE('CUSTOMER ID is '||V_CUST_ID);
DBMS_OUTPUT.PUT_LINE('CUSTOMER DISCOUNT IS '||V_CUST_DISC);
SELECT A.DISCOUNT,A.CERTIFICATION
INTO V_CERT_DISC,V_DISC_NAME
FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
WHERE A.CERTIFICATION=B.CERTIFICATION(+)
AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
DBMS_OUTPUT.PUT_LINE('CERTIFICATION DISCOUNT IS '||V_CERT_DISC);
V_NET:=((V_LIST_PRICE)-(V_LIST_PRICE)*(V_CERT_DISC)/100);
DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER CERTIFICATION DISCOUNT IS '||V_NET);
V_NET_PRICE:=((V_NET)-(V_NET)*(V_CUST_DISC)/100);
DBMS_OUTPUT.PUT_LINE('NET PRICE AFTER COMPLETE DISCOUNT IS '||V_NET_PRICE);
V_EXTN_PRICE:=(V_NET_PRICE)*(p_orderdetails(i).QUANTITY);
DBMS_OUTPUT.PUT_LINE('EXTENDED PRICE IS '||V_EXTN_PRICE);
V_TOTAL_DISC:=((V_CERT_DISC)/100+(V_CUST_DISC)/100);
DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT IS '|| V_TOTAL_DISC);
V_TOTAL_DISC_AMT:=(V_LIST_PRICE)-(V_NET_PRICE);
DBMS_OUTPUT.PUT_LINE('TOTAL DISCOUNT PRICE IS '|| V_TOTAL_DISC_AMT);
SELECT MAX(A.LIMIT)
INTO V_LIMIT
FROM CONVERSION_CERTIFICATION A,CONVERSION_CUSTOMERS B
WHERE A.CERTIFICATION=B.CERTIFICATION(+)
AND B.CUSTOMER_NAME=p_orderdetails(i).CUSTOMER_NAME;
IF p_orderdetails(i).QUANTITY<V_AVL_QUANTITY THEN
INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'QTY HOLD','REQ QNTY LESS THAN AVL QTY',SYSDATE);
INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
END IF;
IF p_orderdetails(i).REQUESTED_SHIP_DATE<SYSDATE THEN
INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'DATE HOLD','SHIPDATE CANNOT BE LESS THAN CURR DATE',SYSDATE);
INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
END IF;
IF V_NET_PRICE>p_orderdetails(i).REQUESTED_PRICE THEN
INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'PRICE HOLD','NET PRICE CANNOT BE MORE THAN REQ PRICE',SYSDATE);
INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
END IF;
/* IF V_LIMIT<p_orderdetails(i).REQUESTED_PRICE THEN
INSERT INTO XXCTS_ORDER_DETAILS VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,V_CUST_ID,V_PROD_ID,p_orderdetails(i).QUANTITY,p_orderdetails(i).REQUESTED_SHIP_DATE,p_orderdetails(i).REQUESTED_PRICE,V_LIST_PRICE,V_TOTAL_DISC,V_NET_PRICE,V_EXTN_PRICE,'ORDER LIMIT HOLD','PRICE CANNOT EXCEED ORDER LIMIT',SYSDATE);
INSERT INTO xxcts_order_discounts VALUES(SEQ_HEADER_ID.NEXTVAL,SEQ_LINE_ID.NEXTVAL,SEQ_DISCOUNT_ID.NEXTVAL,V_DISC_NAME,V_TOTAL_DISC_AMT);
END IF;*/
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE(' INSIDE EXCEPTION BLOCK');
END;
END LOOP;
END;
end conv_api_pkg;
/the pl/sql block to invoke the the procedure :
declare
begin
PROC_CONVERSION_API('/usr/tmp' ,'Walmart_Orders_062908.dat');
end;please let me know what is wrong in the program.
Thanks
AnveshHi Walter
Yes 'Inside begin 1' and 'Inside begin 2' were printed.Please find the the DBMS_OUTPUT statements that were printed.
Inside begin 1
Inside begin 1.1
Inside begin 2
Inside begin 2.1
the buffer is BESTBUY SONY ERICSSON W580i 25 1-AUG-2008 50
the length of buffer is 118
Customer Name is BESTBUY
Manufacturer is SONY ERICSSON
Product Name is W580i
Quantity is 25
Requested Ship Date is 01-AUG-08
The requested price is 50
The quantity is 25
The Customer count is 1
The Product count is 0
PRODUCT SHOULD BE VALID
Inside begin 2
Inside begin 2.1
the buffer is BESTBUY SAMSUNG BLACKJACK 50 15-JUL-2008 150
the length of buffer is 119
Customer Name is BESTBUY
Manufacturer is SAMSUNG
Product Name is BLACKJACK
Quantity is 50
Requested Ship Date is 15-JUL-08
The requested price is 150
The quantity is 50
The Customer count is 1
The Product count is 1
Inside begin 2
Inside begin 2.1
the buffer is BESTBUY APPLE IPHONE 4GB 50 15-JUL-2008
the length of buffer is 116
Customer Name is BESTBUY
Manufacturer is APPLE
Product Name is IPHONE 4GB
Quantity is 50
Requested Ship Date is 15-JUL-08
The requested price is 0
The quantity is 50
The Customer count is 1
The Product count is 1
Inside begin 2
Inside begin 2.1
the buffer is BESTBUY ATT TILT 100 15-JUN-2008
the length of buffer is 116
Customer Name is BESTBUY
Manufacturer is ATT
Product Name is TILT
Quantity is 100
Requested Ship Date is 15-JUN-08
The requested price is 0
The quantity is 100
The Customer count is 1
The Product count is 1
Inside begin 2
Inside begin 2.1
the buffer is BESTBUY NOKIA N73 50 15-JUL-2008 200
the length of buffer is 118
Customer Name is BESTBUY
Manufacturer is NOKIA
Product Name is N73
Quantity is 50
Requested Ship Date is 15-JUL-08
The requested price is 20
The quantity is 50
The Customer count is 1
The Product count is 0
PRODUCT SHOULD BE VALID
Inside begin 2In the first procedure I am trying to read the data from a flat file and store it in a table.Here is the sample data from the flat file.
BESTBUY SONY ERICSSON W580i 25 1-AUG-2008 50
BESTBUY SAMSUNG BLACKJACK 50 15-JUL-2008 150
BESTBUY APPLE IPHONE 4GB 50 15-JUL-2008
BESTBUY ATT TILT 100 15-JUN-2008
BESTBUY NOKIA N73 50 15-JUL-2008 200When tried to execute the second procedure independently using the PL/SQL block,the tables in second procedure were populated and the DBMS_Output statements were also displayed.I have made use of the same query in that case
Thanks
Anvesh
Edited by: Anvesh Reddy on Dec 23, 2008 12:40 PM -
Call a pl/sql stored procedure from a report link
Hello everyone:
I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
My questions are:
- Is this the best method to make what I need?
- How should be the syntax of the link that takes me to another page and run the "stored procedure"
- How and where I put the function "javascript" to run the "stored procedure"
BDD: Oracle 11 g
Apex version 4.1
Best regards
GerardHi,
Change the link to call an apex.submit process. (javascript).
Edit:
I've set up a basic example.
Region 1 (just so you can see the value getting set):
select :P27_HIDDEN item_Value
from dual
Region 2:
select rownum id, dbms_random.string('U', 12) sss
from dual
connect by level <= 20
item attributes for ID:
Target: URL
URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
(P27_HIDDEN is just a hidden item i created)
http://apex.oracle.com/pls/apex/f?p=54920:27
Edit2:
In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
Edit3:
Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary. -
Running a SQL Stored Procedure from Power Query with Dynamic Parameters
Hi,
I want to execute a stored procedure from Power Query with dynamic parameters.
In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
Name_Value = Name_Parameter{0}[Value],
I have tried like below but it is not working.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
Can anyone please help me with this issue.
Thanks
DileepHi,
I got it. Below is the correct syntax.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
Thanks
Dileep -
Deploy warnings using a PL/SQL procedure (from a Public Transform Package)
OWB Version: 10.2
I am receiving the following warnings when I attempt to deploy a map that contains a reference to a custom pl/sql procedure that is setup in a public transformation package:
Warning
ORA-06550: line 115, column 32:
PLS-00112: end-of-line in quoted identifier
ORA-06550: line 115, column 9:
PLS-00103: Encountered the symbol "." when expecting one of the following:
:= . ( @ % ; not null range default character
I reviewed the OWB generated code and I discovered the OWB is a adding two double quotes in front of any reference to the package name. For example.....
BEGIN
COMMIT;
sql_stmt := 'ALTER SESSION DISABLE PARALLEL DML';
EXECUTE IMMEDIATE sql_stmt;
IF NOT ""ZZTEST"."INIT_SF_USER_CLAS_St" THEN
* note the "" in front of ZZTEST, which is the package name.
Has anyone else encountered this issue? I can manually correct the generated the code, but it would be overridden every the time the map is deployed. I encounter the same issue if I import a custom pl/sql procedure from the database into OWB using the Metadata Import Wizard and use the imported procedure in a map. However, I can setup an standalone procedure or function as a public transformation and the map deploys successfully. Please advise.
Regards,
MattYou have to create a job to start your procedure.
Example :
* http://psoug.org/reference/OLD/dbms_job.html
Then create a procedure to start your job, call it from your dashboard and you're done.
Success
Nico -
How to send a Varying Array param to a PL/SQL Stored Procedure from Java
* I am VERY new to jdbc, and even somewhat new to Java
* I'm using Java 1.5, Oracle 10g.
* I need to call the following PL/SQL Stored Procedure from Java:
procedure setEventStatus
i_deQueueStatus in deQueueStatus_type
*deQueueStatus_type is the following (an array of deQueueStatus_OBJ):
CREATE OR REPLACE TYPE deQueueStatus_OBJ as object
eventID number (20),
dequeuestatus varchar2(20)
CREATE OR REPLACE TYPE deQueueStatus_TYPE IS VARYING ARRAY(500) of deQueueStatus_obj
*I have created a Java object as follows:
public class EventQueueDeQueueStatus
long eventID;
String dequeueStatus;
EventQueueDeQueueStatus(long eventID, String dequeueStatus)
this.eventID = eventID;
this.dequeueStatus = dequeueStatus;
I have an ArrayList of these.
I need to pass this list to the Stored Procedure. How do I create a java.sql.Array so I can call CallableStatement.setArray to set the parameter? Or do I use something else? I have tried setObject with both the ArrayList and also with a primitive array, but got "Invalid Column Type" both times.
Any help would be greatly appreciated. I just got this task today, and I have to make it work by Tuesday :-( !
Thanks,
KathyKathy,
Search the archives of this forum and the JDBC forum for the terms STRUCT and ARRAY and you can find some sample code on the JDBC How-To Documents page and the JDBC Samples which can both be accessed from this page:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
Good Luck,
Avi. -
How to call a stored procedure from WorkShop
Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
me .. Today I'm simply trying to find out how to call a stored procedure from
within workshop, using any of the DB Controls .. I see workshop provides a way
create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
to be entered in place of the inline query .. Perhaps I've over looked it. Any
advise on the best way to tackle this task will be appreciated.
AtahualpaAtahualpa--
Maybe this will help:
http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
Eddie
Atahualpa wrote:
Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
me .. Today I'm simply trying to find out how to call a stored procedure from
within workshop, using any of the DB Controls .. I see workshop provides a way
create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
to be entered in place of the inline query .. Perhaps I've over looked it. Any
advise on the best way to tackle this task will be appreciated.
Atahualpa
Maybe you are looking for
-
EHP installing. Error in phase MAIN_SHDRUN/JOB_MSSSPEXE_SHD
Hello all, Dealing with ECC's EHP4 installation and having problem with step JOB_MSSSPEXE_SHD. Firstly, want to give some system overview. System was migrated from x32 non-Unicode to x64 Unicode through SystemCopy OS: Windows Server 2008 SP2 DB: MS S
-
After installing the x64 with all tools excluding the SDK from the SQL Express Edition, I go to Management Studio, log in and get the error when I click under the Instance name- Databases...Have reinstalled many times, removed all directories and reg
-
59 minute, 337 MB .mp4 file too big for DVD disc in iDVD 6???
Going crazy here!! I have several 59 minute TV shows that I would like to create a menu for & then burn on a DVD that I can then easily watch on my DVD player. The file was originally an .avi file in PAL format. I tried creating the menu using the 'P
-
Question regarding scripting OS install + applications
I'm getting the hang of SCCM now and I thank you all who have helped greatly answering my (many) questions here. It is really appreciated. One of my next questions is - can I create a task sequence that installs both OS and applications all in a s
-
i followed the documents in sun to use JNDI for database connection but i got an expection: Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or