Re-execute View SQL after DML
Hi everyone,
I am displaying a selectable list of records on a page. Upon selection of any of the records users are forwarded to an edit page where they can perform a DML operation on the selected row. If they commit the changes I want to re-execute the query that displays the list of records on the main page as some rows might not need to be re-displayed.
I am not using backing beans for the pages so I would like to now if I still can achieve this without the use of beans. If it is possible could you give me some pointers on what is the best approach to follow?
Many thanks in advance for your help!
Regards,
Sacha
No worries I found out how to do it.
Cheers.
Similar Messages
-
Execute a SQL-Insert after update the target
Hi to All,
my scenario is SQL_1 -> XI -> SQL_2, but after update the SQL_2, I need to execute an SQL-insert. Can I do this without BPM?
Regarts
RobertoHi Roberto,
If you want to insert the SQL_2 after updation of SQL_2 then BPM is not required.
After updating the target you can execute the insert operation. I think , you can go for Stored procedures here.
But if you want Response back to XI after successful Update, then BPM is required.
>>You can do this in the stored procedure. For e.g just check this blog-
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Regards,
Moorthy
Message was edited by: Krishna Moorthy P -
Error after executing dbowner.sql file
I'm installing People Soft and I'm on the step for executing sql files
I'm trying to execute dbowner.sql that is content of it
set echo on
spool dbowner.log
GRANT DBA TO PS IDENTIFIED BY PS;
CONNECT PS/PS;
CREATE TABLE PSDBOWNER (DBNAME VARCHAR2(8) NOT NULL, OWNERID VARCHAR2(8) NOT NULL ) TABLESPACE PSDEFAULT;
CREATE UNIQUE INDEX PS_PSDBOWNER ON PSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
CREATE PUBLIC SYNONYM PSDBOWNER FOR PSDBOWNER;
CONNECT system/manager;
REVOKE DBA FROM PS;
ALTER USER PS QUOTA UNLIMITED ON PSDEFAULT;
spool off
after execution i received this
SQL>
SQL> GRANT DBA TO PS IDENTIFIED BY PS;
Grant succeeded.
SQL> CONNECT PS/PS;
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Connected.
SQL> CREATE TABLE PSDBOWNER (DBNAME VARCHAR2(8) NOT NULL, OWNERID VARCHAR2(8) NOT NULL ) TABLESPACE PSDEFAULT;
Table created.
SQL> CREATE UNIQUE INDEX PS_PSDBOWNER ON PSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
Index created.
SQL> CREATE PUBLIC SYNONYM PSDBOWNER FOR PSDBOWNER;
Synonym created.
SQL> CONNECT system/manager;
Connected.
SQL> REVOKE DBA FROM PS;
Revoke succeeded.
SQL> ALTER USER PS QUOTA UNLIMITED ON PSDEFAULT;
User altered.
SQL>
SQL> spool off
could you help me?
If you need more info write me>
SQL> CONNECT PS/PS;
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
>
script PUPBLD.SQL runs from psadmin.sql, but this is run after the dbowner.sql
+@%ORACLE_HOME%\sqlplus\admin\pupbld+
You can try running this script (PUPBLD.SQL) manually, but I never saw this going wrong. Something has gone wrong, which will most likely give more errors later on.
Did you run the scripts in the correct order with the correct user:
createdb10.sql - as sysdba
utlspace.sql - as sysdba
dbowner.sql - as sysdba
XXddl.sql - as sysdba
psroles.sql - as system
psadmin.sql - as system
connect.sql - as system
Regards,
Hakan
Added psroles.sql thanks to bandar
Edited by: Hakan Biroglu on Aug 21, 2012 8:26 AM -
ORA-06528: Error executing PL/SQL profiler
Hai
I would like to see the outcome of package (to view the report on the package).In order to get that
I installed the below package connect as internal
sql>d:\oracle\orq81\rdbms\admin\profload.sql
In order to use dbms_profiler,after that i need to have installed profilling tables ,in order to get i ran proftab.sql ,and its created three tables are
plsql_profiler_data,plsql_profiler_units,plsql+profiler_runs
after that i ran the below procedure
create or replace procedure do_mod as
cnt number := 0;
begin
dbms_profiler.start_profiler( 'mod' );
for i in 1 .. 500000
loop
cnt := cnt + 1;
if ( mod(cnt,1000) = 0 )
then
commit;
end if;
end loop;
dbms_profiler.stop_profiler;
end;/
PL/SQL procedure successfully completed.
exec no_mod
PL/SQL procedure successfully completed.
In order to see the report on packge ,i had query the table , RUN_TOTAL_TIME IS 3.5190E+11(this is seconds)
my qusetion is
1)
Please explain me that is total amount time in seconds or minutes,i donnot understand what is 3.5190e+11
SQL> select RUNID,RUN_COMMENT,RUN_TOTAL_TIME FROM PLSQL_PROFILER_RUNS;
RUNID
RUN_COMMENT
RUN_TOTAL_TIME
1
mod
7.0975E+11
2
mod
6.9767E+11
RUNID
RUN_COMMENT
RUN_TOTAL_TIME
3
no mod
3.5190E+11
2)
I had ran the above script one of the schema ,and successfully created above procedure.When i execte,it retuns below error message
SQL> exec do_mod;
BEGIN do_mod; END;
ERROR at line 1:
ORA-06528: Error executing PL/SQL profiler
ORA-06512: at "SYS.DBMS_PROFILER", line 123
ORA-06512: at "SYS.DBMS_PROFILER", line 132
ORA-06512: at "MOHAN1.DO_MOD", line 4
ORA-06512: at line 1
Any one any idea about that
Regards
mohan1) Run_total_time is the elapsed total time in nanoseconds.
A nanosecond is one billionth of a second.
It is displayed in scientific notation
where E stands for "times ten to the power of".
So, 3.5190E+11 nanoseconds
= 3.5190 * 100000000000 nanoseconds
= 351900000000 nanoseconds
= 351900000000 billionths of a second
= 351900000000 / 1000000000 seconds
= 351.9 seconds
If you want to display it in seconds, use:
SELECT runid,
run_comment,
run_total_time / 1000000000 AS seconds
FROM plsql_profiler_runs;
2) The only thing that looks wrong about your do_mod procedure
is the last line:
end;/
The / should be on the next line.
Other than that, I don't see any possible cause for
the error. -
Execute t-sql before retrieving report data
Hi,
Is there a way to execute t-sql, with the connection from within the report, before the report retrieves it's data?
I need this to initialize the connection's context_info.
After searching the web I have found a solution to my problem which is instead of using a View, use a stored procedure which takes care of initializing the context_info and return the result of the view.
Is there any other solution using crystal reports XI (sp none)?Download the service Pack or upgrade to CR XI R2 ( 11.5 ) for free and use your XI keycode to install it.
Only other way would be to possibly use a SQL Expression, it may work. Only one data source can be used if using an expression.
Thank you
Don -
How to execute an SQL query present in a string inside an ABAP program?
hello,
How to execute an SQL query present in a string inside an ABAP programRaut,
You can execute Native SQl statements.
Ex: To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
EXEC SQL [PERFORMING <form>].
<Native SQL statement>
ENDEXEC.
There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax. You need to know whether table and field names are case-sensitive in your chosen database.
In Native SQL statements, the data is transported between the database table and the ABAP program using host variables. These are declared in the ABAP program, and preceded in the Native SQL statement by a colon (:). You can use elementary structures as host variables. Exceptionally, structures in an INTO clause are treated as though all of their fields were listed individually.
If the selection in a Native SQL SELECT statement is a table, you can pass it to ABAP line by line using the PERFORMING addition. The program calls a subroutine <form> for each line read. You can process the data further within the subroutine.
As in Open SQL, after the ENDEXEC statement, SY-DBCNT contains the number of lines processed. In nearly all cases, SY-SUBRC contains the value 0 after the ENDEXEC statement. Cursor operations form an exception: After FETCH, SY-SUBRC is 4 if no more records could be read. This also applies when you read a result set using EXEC SQL PERFORMING.
EXEC SQL PERFORMING loop_output.
SELECT connid, cityfrom, cityto
INTO :wa
FROM spfli
WHERE carrid = :c1
ENDEXEC.
Pls. Mark If useful -
Error in executing dynamic SQL
i am getting error in executing dynamic SQL
declare
vr_RenewService NUMBER(10,0);
vr_sql VARCHAR2(50);
begin
vr_sql:='Select Case
when 5 <= 365 Then 1
When 1= 0 Then 1
else 0 end into' || TO_CHAR(vr_RenewService) || 'from dual;';
execute immediate vr_sql;
--dbms_output.put_line(vr_RenewService);
end;
ERROR
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 6
06502. 00000 - "PL/SQL: numeric or value error%s"
*Cause:
*Action:i too have tried this before you posted this solution but getting error message
declare
vr_RenewService NUMBER(10,0);
vr_sql VARCHAR2(100);
begin
vr_sql:='Select Case
when 5 <= 365 Then 1
When 1= 0 Then 1
else 0 end from dual;';
execute immediate vr_sql into vr_RenewService;
--dbms_output.put_line(vr_RenewService);
end;
ORA-06512: at line 11
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action: -
How to execute a .sql file from a batch file
Hi all
I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
i created a batch file prod.bak with the following lines
@echo off
set oracle_sid=testdb
set oracle_home=d:\oracle\ora92
sqlplus /nolog
connect sys as sysdba/oracletest@testdb
this batch file when eexecuted connects me to sql prompt.
Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
(i tried with these lines in the above batch file...
call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
start bkp.sql---same as call
connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
Thanks
TriptiTry
sqlplus "sys/oracletest as sysdba" @bpk.sql
Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
Remember to put an exit at the end of the bpk.sql script. -
How execute pl/sql command from Oracle ADF Business Components
can't find examples for how execute pl/sql command from Oracle ADF Business Components and how call pl/sql package procedure from ADF Business Components.
insert,update,delete rows in view object instance cache is good but if i must do some complex operations while insert,update,delete rows..it's more better for me to call
pl/sql procedure from oracle db.Am i wrong ????Roman,
this should be similar to how it worked in JDeveloper 9.0.3. hava a look at <JDev903 Home>\BC4J\samples\StoredProc for a code example.
Frank -
XL Reporter Installation - Error executing IXMetaProcs.sql
Hi All,
During installation getting error-
Error Preparing Metadata Repository:
Executing SQL script 'IXMetaProcs.sql' (Start:....)
ExitCode -1073741819
!!! ERROR Error executing IXMetaProcs.sql ExitCode -1073741819
I have done the following checks.
1. XL Reporter has bee removed from Administrator->Add-On Administrator.
2. Add-Remove List Does not show XL Reporter.
3. Removed manually Database IXMetaSBOOEM from SQL Server.
4. %temp% - > SM_OBS_DLL folder not found.
5. ILytix folder not found in HKEY_CURRENT_USER -> Software
ILytix folder not found in HKEY_LOCAL_MACHINE-> Software
6. There is no other add-on installed
7. AddOnsInstall.sbo deleted.
AddOnsLocalRegistration.sbo not found.
8. C:\Prog Files\SAP\SAP Business One\Add-Ons folder not found.
But still I can't install XL Reporter.hi,
first you have to check that you have install "dot. Net Framework 2.0" which is compulsory needed for installing XL reporter, also you have to install MS Office in your system.
uninstall the XL reporter and install using the following steps
installation steps of XL-reporter add-on,
1. goto add-on administration => Register Add-on(click).
give the XL reporter address. select default group as Manual.
update.
2. goto addon manager => pending Add-on tab => select the addon row and install.
in installation give the user id and pwd of SQL server.
3.goto addon manager =>installed addons tab, start the XL reporter, once it get connected as status.
4. go to tools menu in SAP B1, in that you will find XL reporter, click that XL reporter will open.(to view XL reporter)
follow the above steps you will get the XL repoter add-on running in SAP B1.
regards
sandip -
Execute PL/SQL upon click of a button
I am using APEX 4.0 in Oracle 11g Express edition.
I want to execute some PL/SQL code upon click of a button, I read in other threads that I can edit the button's action to 'Defined by Dynamic Action'. However, when I create a button, I do not get 'Defined By Dynamic Action' as an action choice.
Is this only valid for APEX 4.1? If so, is there a way I can do this?Hello,
After clicking the button, do you want to submit the page and execute PL/SQL or you want to execute with submitting the page?
With Submit:
Create page process -
Type - PL/SQL anonymous block
Process Point - On Submit - After Computations and Validations
Conditions - When Button Pressed (Process After Submit When this Button is Pressed) select your button.
Without Submit:
Create a Advanced Dynamic Action
Event - Click
Selection Type - jQuery Selector
jQuery Selector - <Selector to select your button> (for e.g. #BUTTON_123 where BUTTON_123 is ID of your button)
Next >>
Action - Execute PL/SQL
PL/SQL Code - Put your PL/SQL Code here
Page Items to Submit - Typically List of pages items you want to access in PL/SQL code
Hope it helps.
Regards,
Hari -
Error executing db6_update_db.sh after DB2 9.7 FixPack 4
Hi experts,
We are encountering error while executing db6_update_db.sh after DB2 9.7 FP4. Has anybody encountered the same error? Any SAP notes you could suggest? Below are some informations on the error. We would appreciate any response and help to resolve the issue. Thanks in advance.
Executing the script:
db6_update_db.sh script version 0026 *
detected DB2 Release: 090704
./db6_update_db.sh version 0026 started on Fri Mar 2 03:25:34 GMT 2012
Generate Script Header : OK
Check and create 16K Bufferpool if required : OK
Run db2upd tools according to release if required : OK
Invoke the db2sap libary : OK
Rebind packages : OK
Establish sysdummy workaround : ERROR
ERROR: SQL error occured.
Failed with return code 2. Please look for problems in the log file /db2/db2k3d/
db6_update_db.log
./db6_update_db.sh finished successfully (RC=0) on Fri Mar 2 03:25:37 GMT 2012
Checking the logs.
DEBUG: () : ACTION_TEXT: Establish sysdummy workaround
Establish sysdummy workaround
DEBUG: sqlExecute() : entry
DEBUG: () : PARAM_SQL_FILE:
/db2/db2k3d/db6_update_db_out.sql
DEBUG: () : SQL_LINES_BEFORE: 42
DEBUG: () : PARAM_SQL_STMT:
SELECT 'GRANT SELECT ON TABLE SYSIBM.SYSDUMMY1 TO PUBLIC;'
FROM TABLE( VALUES( 'PUBLIC' ) ) AS SAPAUTH( USERNAME )
LEFT OUTER JOIN ( SELECT GRANTEE
FROM SYSCAT.TABAUTH
WHERE GRANTEE = 'PUBLIC' AND
GRANTEETYPE = 'G' AND
TABNAME = 'SYSDUMMY1' AND
TABSCHEMA = 'SYSIBM' AND
(SELECTAUTH = 'Y' OR SELECTAUTH = 'G')) AS TABA
UTH
ON SAPAUTH.USERNAME = TABAUTH.GRANTEE
WHERE TABAUTH.GRANTEE IS NULL
SQL1024N A database connection does not exist. SQLSTATE=08003
DEBUG: () : ERRORHmm, interesting.
db6_update_db.sh is a ksh script. I have a PMR open for seemingly similar problems with ksh93 disconnects since upgrading to AIX 7.1 from 5,3. Previous the same script worked fine. Further testing has found similar problems under fewer circumstances with AIX 5.3. We haven't encountered the issue with ksh yet, but who knows...
As Thomas suggested, DB2DBDFT masks the problem so long as a persistent connection is not required.
Regards,
Jeremy Rickard -
How to execute a method after page Load?
My question is very similar to what was discussed in following thread:
How to execute a method after page Load?
My requirement is that I want to run a method in backing bean of a page, immediately after the page gets loaded. In that method I want to invoke one of the method action included in the pagedef of this page, conditionally.
I tried using the approach given in the above thread, i.e to use <f:view afterPhase="#{backing_security.setPermPriv}">, but the problem is that our page is not using 'f:view' , so I explicitly added one f:view with afterPhase property set , but it is not working, page it self is not getting loaded, it is throwing the error:
Root cause of ServletException.
java.lang.IllegalStateException: <f:view> was not present on this page; tag [email protected]e8encountered without an <f:view> being processed.
at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.setProperties(UIXComponentELTag.java:108)
at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:733)
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:71)
at oracle.adfinternal.view.faces.taglib.UIXQueryTag.doStartTag(UIXQueryTag.java:41)
at oracle.adfinternal.view.faces.unified.taglib.UnifiedQueryTag.doStartTag(UnifiedQueryTag.java:51)
at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:262)
at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:665)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:387)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:822)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:746)
Please help to resolve this issue, or am I doing anything wrong?Hi,
I assume that your view is a page fragment and here - indeed - the f:view tag cannot be used. If you use ADF then one option would be to use a custom RegionController on the binding layer to listen for the render phase to invoke the method. Another option would be to use a hidden field (output text set to display="false" and have this component value referencing a managed bean property. The managed bean property's getter method can now be used to invoke the method you want to run upon view rendering
Frank -
How to execute a SQL sentence in a package?
Hi everybody!!
After executing the standard Copy package I need to execute a SQL sentence (an INSERT INTO database), I don't know the easiest way of doing this. I've tried to modify the Copy package adding an additional DumpLoad Task but it doesn't work.
¿Can anybody tell me how could I execute a SQL sentence when running a package?
Thank you in advance
PedroI think you will need to edit or copy the existing SSIS package. Then in the SQL BIDS tool, open the package, add a new SQL based TASK, such as SCRIPT TASK or EXECUTE SQL TASK to the process and add the flow link. Once you have added what you need, the easiest thing is to save the package back to the BPC location with a new name, add the new package to the DM list via the BPC client, and test. You will need access to the file server for BPC and the SQL DB system.
Hope that helps. -
SSIS execute single SQL Task for running multiple SQL statements on TeraData DB connection
Hi,
I need to run multiple statements in TeraData connection ("Go" command between the statements is not recognized). how can I execute 1 SQL task referring to those multi statements? I'm using file connection as well. all the statements located in a single
file.
I'm working with SSIS 2008, TERADATA 12.0.
Thankssure.
create winbatch file (*.bat).
in batch file set that command:
bteq < scriptfilePath.txt (or .bteq)> LogsFolderPathOutputfile.out
scriptfile should contain:
.logon
Server/user, pswd
your script.
if you want to set error handeling points, set the followings between yor command statements:
.IF ERRORCODE <> 0 THEN .GOTO SqlError;
at the end of script, set:
-- Log successful completion
.LOGOFF;.QUIT 0;
.LABEL SqlError.QUIT ERRORLEVEL;
you can view logs at the outputfile you stated above.
enjoy.
Maybe you are looking for
-
Green Excel logo on screen but will not open or quit?
Excel will not open or close on my iMac. The Greeen Excel logo opens but just remains on the screen while the spinning ball spins endlessly. Cannot be closed by restarting or "quitting" from the Dock.
-
How do you adjust an image placed in a shape?
In AICS6 I have a compound path made of two half-circle looking shapes. They have to be separate because they are puzzle pieces. Inside of this I am placing an AI illustration that is a group of over 100 shapes. The problem is this: Once inside the c
-
Procedure runs from 9i odbc drivers but not from 10g.
Hi i have a old vc++ application which calls a stored procedure. This application has been in use for a long time. earlier the Database server and client were both oracle 9i. now we moved the server and some of the clients to 10g. The application sti
-
I am using iphone 5 and i didn't get notifications of whatapp,facebook,wechat
i am using iphone 5 and i didn't get notifications of whatapp,facebook,wechat give me solution i also upgrad to ios7 but problem contui...
-
PowerBuilder 12.5.2 EBF
Is there a location for the current EBF files? I'm running PM 12.5.2 Build 5583