Re-query from database?
Pardon this basic question!
Two users using BC4J against the same database, using Swing applications.
User A inserts a new record into table T. Commits changes.
Later, user B needs to update / access the new record in T. Neither user has logged off (if B exits the program and restarts it, they can see the new record, but this isn't a desirable solution).
The way things are right now, B can't see the new record as a result of BC4J caching.
What are my options?
Thanks!
You can reexecute the query for B to freshen all new/removed rows before update. Or if all the caches are in one VM (both A and B are connecting to BC4J apps in a pool in a javaVM), then you can use commitAndSync apis instead of commit() to sync up caches in all AMs in the pool.
Similar Messages
-
Call query from database as item source
Hello!
I have a query that is too long to paste it as the record source for an Apex item. It exceeds the limit of 32K.
Is there a way to save that query at database level and call it from the apex item?
If there is, please be so kind and give a small example!
Thank you,
SebastianHello,
Why not put that code into a PL/SQL packaged function and use the "PL/SQL Function Body" or "PL/SQL Function or Expression" types instead?
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
Urgent : Featching query from database
Please any one help for this query
I have two tables Emp, Dept
I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
Query is fetching like this
Empno Ename job Salary Comm deptno deptno dname Loc
15 i1 support 50000 11 5 5 IT sss
15 i1 support 50000 11 3 3 Account sss
16 i2 support 8000 10 5 5 IT sss
16 i2 support 8000 10 3 3 Account sss
16 i2 support 8000 10 3 3 Software sss
16 i2 support 8000 10 4 4 Operation sss
Query is fetching 6 rows.
but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
Here is the example (My Requirement):
This is first row:
Empno Ename job Salary Comm
15 i1 support 50000 11
Deptno dname Loc
5 IT sss
3 Account sss
This is second row:
Empno ename job Salary Comm
16 i2 support 8000 10
Deptno dname Loc
5 IT sss
3 Account sss
2 Software sss
4 Operation sss
thanks
ramumaybe this helps you
if not, i'm sorry:
for rec in (select empno, ename, job, salary, comm, deptno from emp)
loop
dbms_output.put_line(empno||' '||ename||' '||job||' '||salary||' '||comm, deptno);
dbms_output.put_line(rec.empno||' '||rec.ename||' '||rec.job||' '||rec.salary||' '||rec.comm);
for rec1 in (select deptno, dname, loc from dept where deptno=rec.deptno)
loop
dbms_output.put_line(deptno||' '||dname||' '||loc);
dbms_output.put_line(rec1.deptno||' '||rec1.dname||' '||rec1.loc);
end loop;
end loop;
Hope this helps,
Mick -
How to set the link to the result which are executed my query from database
Hi,
i have successfully displayed the results which are available in the database by jdbc, query.
Then, How to give the link like href to each & every result...
note: The number of records may be change. depending upon the records availablity in the database. but every result have the link.
Thanks in advance.
Regards
Kumarhai kumar..
i post an example code ..
<%
ResultSet rs1=stmt.executeQuery("select fromu,subject,message,mdate,status,mesid from message where to='" + lname +"'" );
while(rs1.next())
l=rs1.getLong(6);
out.println("<tr align='center'> <td> <a href='deletemessage.jsp?mesid="+ l + "'>Delete </a></td><td>" + rs1.getString(1) +"</td><td> <a href='viewmessage.jsp?mesid="+ l +"'>"+ rs1.getString(2) +"</a></td><td>"+ rs1.getString(4) +"</td><td>"+ rs1.getString(5) +"</td></tr>");
%> -
Problem in populating lookup values based on the lookup query from database
HI all
I have problem of population look-up values based on look-up query
I am giving the details what i am trying
I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
i planned to set the properties of lookup as like this
look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
ColumnNames as UD_LDAP_USR_COMMON_NAME
Column captions as UD_LDAP_USR_COMMON_NAME
Column width as 30
Lookup Column Name as UD_LDAP_USR_COMMON_NAME
But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
Let me give update on this issue
Urgent,struck my work here
thanks
NagarajThanks for the reply raghav
I tried but it was not working
I gave like what u specified but no use
It is throwing exception like set look-up query for the field
Any one help me out on this issue
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM -
Help with Retrieve attributes from database
Hi,
I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
I'm unable to get these user attributes with column names.
For eg : select tag from test_tag where rownum=1;
I was trying so that result can be used using tag attribute (${tag}).
Please help in this regard.
Thanks,
VaniHi Vani,
After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
Cheers,
Stefan -
View links in oracle ADF/query featching from Database
Please any one help for this query
I have two tables Emp, Dept
I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
Query is fetching like this
Empno Ename job Salary Comm deptno deptno dname Loc
15 i1 support 50000 11 5 5 IT sss
15 i1 support 50000 11 3 3 Account sss
16 i2 support 8000 10 5 5 IT sss
16 i2 support 8000 10 3 3 Account sss
16 i2 support 8000 10 3 3 Software sss
16 i2 support 8000 10 4 4 Operation sss
Query is fetching 6 rows.
but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
Here is the example (My Requirement):
This is first row:
Empno Ename job Salary Comm
15 i1 support 50000 11
Deptno dname Loc
5 IT sss
3 Account sss
This is second row:
Empno ename job Salary Comm
16 i2 support 8000 10
Deptno dname Loc
5 IT sss
3 Account sss
2 Software sss
4 Operation sss
i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
plz any one can help
thanksPlease any one help for this query
I have two tables Emp, Dept
I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
Query is fetching like this
Empno Ename job Salary Comm deptno deptno dname Loc
15 i1 support 50000 11 5 5 IT sss
15 i1 support 50000 11 3 3 Account sss
16 i2 support 8000 10 5 5 IT sss
16 i2 support 8000 10 3 3 Account sss
16 i2 support 8000 10 3 3 Software sss
16 i2 support 8000 10 4 4 Operation sss
Query is fetching 6 rows.
but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
Here is the example (My Requirement):
This is first row:
Empno Ename job Salary Comm
15 i1 support 50000 11
Deptno dname Loc
5 IT sss
3 Account sss
This is second row:
Empno ename job Salary Comm
16 i2 support 8000 10
Deptno dname Loc
5 IT sss
3 Account sss
2 Software sss
4 Operation sss
i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
plz any one can help
thanks -
SQL query or view used internally by Discoverer Open Workbook from Database
Hi Experts,
I am involved in developing a web application wherein I have to display the 'All Workbooks' similiar functionality in the 'Open Workbook from Database' dialog box of Discoverer. Can anybody provide me with the background query or view that Discoverer uses to retrieve this data for workbook listing? Please let me know if my question is confusing and requires more details.
Thanks
ThomasHi,
If you just need the list of workbooks then you need to use the EUL_DOCUMENT table:
SELECT u.User_Name Owner_Name
*,Doc.Doc_Name Workbook_Name*
*,Doc.Doc_Updated_Date Last_Update_Date*
FROM Eul_Us.Eul5_Documents Doc
*,Eul_Us.Eul5_Eul_Users Own_Usr*
*,Fnd_User u*
WHERE Own_Usr.Eu_Id = Doc.Doc_Eu_Id AND
To_Char(u.User_Id(+)) = Substr(Own_Usr.Eu_Username
*,2*
*,10);*
If you want the exact same list then you need to do the above along with the sharing :
SELECT DISTINCT
case when instr(disco_docs.doc_created_by,'#')=0 then disco_docs.doc_created_by
when instr(disco_docs.doc_created_by,'#')>0 and instr(disco_docs.doc_created_by,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_docs.doc_created_by,2,5))
else NULL
end "Workbook Owner/Creator",
disco_docs.doc_name "Workbook Name",
disco_docs.Doc_Updated_Date "Last Update Date",
case when instr(disco_users.eu_username,'#')=0 then disco_users.eu_username
when instr(disco_users.eu_username,'#')>0 and instr(disco_users.eu_username,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_users.eu_username,2,5))
else (select resp.responsibility_name from fnd_responsibility_tl resp where resp.responsibility_id=substr(disco_users.eu_username,2,5))
end as "Shared Name / Responsibility"
FROM
eul_us.eul5_documents disco_docs,
eul_us.eul5_access_privs disco_shares,
eul_us.eul5_eul_users disco_users
WHERE
disco_docs.doc_id = disco_shares.gd_doc_id (+)
and disco_users.eu_username(+) NOT IN ('EUL5', 'PUBLIC')
AND disco_users.eu_id(+) = disco_shares.ap_eu_id;
* Change the EUL_US to your discoverer schema...
Then you will need to compare the current user with the sharing list or creator
Good luck
Tamir -
Urgent! How to insert into and query video from database in forms???
In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected]In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected] -
Return value from database function taking a lot more time than the query
Hi guys,
I have a Query that does a call to a database function. The function takes in a few parameters and returns a Date. Now, the query within the function takes barely .05 seconds. However, doing a select get_join_dates from dual is taking almost 6 seconds for each call.
Here is the Query:
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date = get_join_dates( :p_year,
:p_month,
:p_student_id,
s.organization_code );And here is the database function. The select inside this function barely takes 0.05 seconds per call. This function gets called 3 times in my case as there are 3 records in the org_body table for this student.
create or replace function
get_join_dates( p_yyyy in org_body.fiscal_yyyy%type,
p_month in org_body.fiscal_mm%type,
p_student_id in student.student_id%type,
p_organization_code in org_body.organization_code%type) return date as
t_enrollment_date date;
cursor cur_latest_enrollment_date is
select max(enrollment_date)
from org_body
where fiscal_yyyy = p_yyyy
and fiscal_mm = p_month
and student_id = p_student_id
and organization_code = p_organization_code;
BEGIN
open cur_latest_enrollment_date ;
fetch cur_latest_enrollment_date into t_enrollment_date;
close cur_latest_enrollment_date ;
return t_enrollment_date;
exception
when others then
null;
end;owever, when I run the following statement below, it takes close to 6 seconds to retrieve a record. In turn, my Query is becoming really slow and taking almost 35 seconds. Imagine that with more records.
select get_join_dates( 2010, '01', '2167543', 'PSYCH01' ) from dual;If I run my query with this condition below, it takes 0.5 seconds.
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date = '01-JAN-10'Any ideas would be greatly appreciated.Any reason why you are doing this with the stored function?
You could just do this with SQL. Embed the query in the function as a subquery in your initial query from STUDENT.
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date =
(select max(enrollment_date)
from org_body
where fiscal_yyyy = :p_year
and fiscal_mm = :p_month
and student_id = s.student_id
and organization_code = s.organization_code);Why your function is not performing: I cannot say that with the information you have provided.
Maybe sqltrace a call and see what the reason is. -
PC session hangs when launch a query from Oracle 9i client to 10g database
I have a pc with Oracle 9.2.0.1.0 client installed. The database server level is 10.1.0.5.
When I launch a query from a client session the pc sesssion locks up and doesn't return any results. When I launch the same query from the database server , or from other pcs with Oracle client 10 installed , I get results almost immediately from the query.
The pc in question is running Windows XP Service pack 2. Other queries run fine from the pc.
Are there are any known issues with Oracle 9 clients querying an Oracle 10 database ?Thank you for your reply. No, I must admit I didn't think of looking at the wait events. I will look at this as soon as I get a chance.
Thanks again for your suggestion. -
Select query from 2 schema & database
Hi,
what privileges should i give to execute select query from 2 schema & database in oracle
thanksHi,
not so clear, if you are looking for this
-- for other schema access
GRANT SELECT ON <scheman_name>.<table_name> TO <schema_name>;
or create the synonym
--for other database access you need to create db link -
I want to query oracle database from sql server can anyone tell steps 2 fo
i want to query oracle database from sql server can anyone tell steps 2 followed
i tried with linked servers but it is throwing errors can anyone hepl in this regard
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].First of all - you are in the wrong forum.
Look either for the Database general or search for Transparant / Heterogenous Gateways.
cu
Andreas -
I want to query oracle database from sql server can anyone tell steps 2 fol
i want to query oracle database from sql server can anyone tell steps 2 followed
i tried with linked servers but it is throwing errors can anyone hepl in this regard
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].First of all - you are in the wrong forum.
Look either for the Database general or search for Transparant / Heterogenous Gateways.
cu
Andreas -
Run a SQL procedure with multi database querying from Excel
I'm using SQL Server 2008 Enterprise. I created a procedure in one database. The procedure is composed of several queries to different databases and the final combined result set is being displayed.
I try to execute it via Excel, so the results will appear automatically in Excel sheet, but I'm getting the error:
"The query did not run, or the database table could not be opened. Check the database server or contact your DBA. Make sure the external
database is available and hasn't been moved or recognized, then try the operation again".
I created a simpler procedure that queries only one database, and the results displayed at the Excel sheet with no issues.
I suspect that, the original procedure failed due to the fact that I'm querying several databases in the procedure, when in the connection details of the "External Data Properties", only one database is mentioned.
My question is - can it be solved? Can I use multiple databases in the procedure and see it in the Excel?
Thanks, RoniUse Global Temporary table(##) instead of Local Temporary table(#).
The scope of the temp table is limited to one database and it dispose automatically when jump to another database.
No, that is not correct. From where did you get that idea?
USE tempdb
go
CREATE TABLE #a(a int NOT NULL)
INSERT #a(a) VALUES(9)
go
USE master
go
SELECT a FROM #a
go
USE msdb
go
SELECT a FROM #a
go
DROP TABLE #a
And Roni's stored procedure does not even change database.
...however, the temp tables may very well be the problem, but for a completely different reason. Excel may ask SQL Server for the shape of the result set before it runs the procedeure, and this does not work with the temp tables. For this reason, using a
table variable my save the show.
Erland Sommarskog, SQL Server MVP, [email protected]
Maybe you are looking for
-
Why are some of the loops in GB 'greyed
Why are some of the loops in GB 'greyed out' " I'm specifically interested in 'slide guitar' for example and cant find a reason why there's no access. My iMAC was bought in April 2010??
-
Safari Quit Unexpectedly-help!
My Macbook Pro has been giving me a "Safari quit unexpectedly" message every time I attempt to type inside the address bar. Please advise! (Macbook Pro 15-inch, Late 2011, Safari OS X 10.9.4) Process: Safari [498] Path: /Applicatio
-
Exporting a BI report to excel 2007 from Portal
Hi, Any one please let me know is there any option to export a BI report from portal to MS excel 2007, the option which we have directly prompts to save in 2000/2003. Regards, Pradeep
-
I need some help with the volume on my macbook pro. I am getting absolutely no sound no matter if I push the volume increase or decrease button. Nothing changes. The volume bar shows up as if it were at full volume but no sound and the mute button do
-
From where can we get some more documents in xml publisher i.e more than the help file present in the xml publisher. If Anyone have the document please help