How to use one query against multiple table and recieve one report?
I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.
hey
a. the all 256 tables whuld be one big partitoned table
b. you can use all_tables in order to write a select that will write the report for you:
SQL> set head off
SQL> select 'select * from (' from dual
2 union all
3 select 'select count(*) from ' || table_name || ' union all ' from a
4 where table_name like 'DB%' AND ROWNUM <= 3
5 union all
6 select ')' from dual;
select * from (
select count(*) from DBMS_LOCK_ALLOCATED union all
select count(*) from DBMS_ALERT_INFO union all
select count(*) from DBMS_UPG_LOG$ union all
remove the last 'union all', and tun the generated quary -
SQL> set head on
SQL> select * from (
2 select count(*) from DBMS_LOCK_ALLOCATED union all
3 select count(*) from DBMS_ALERT_INFO union all
4 select count(*) from DBMS_UPG_LOG$
5 );
COUNT(*)
0
0
0
Amiel
Similar Messages
-
Dbms_xmlgen.newcontext query from multiple tables and ||
I have two questions
How do I get a dbms_xmlgen.context to query from multiple tables? I have been able to make it work with using one table only, but not with multiple tables.
And how to get the || (concat) to work within my query for my output to an xml file?
Here is my current query:
create or replace function get_xml return clob is
result clob;
qryctx dbms_xmlgen.ctxHandle;
SELECT DBMS_XMLGEN.getxml('select prefix, suffix, fiscal_yr
FROM rcv.recv_accessions ra
where ra.prefix = 8 and ra.fiscal_yr = 11')xml into result FROM dual;
result := DBMS_XMLGEN.getXML(qryCtx);
This is what I desire:
SELECT DBMS_XMLGEN.getxml('select ra.prefix||'-'|| ra.suffix||'-'|| ra.fiscal_yr accession, ss.date_in, st.test
FROM rcv.recv_accessions ra, ser.sero_samples ss, ser.sero_tests st
where ra.prefix = 8 and ra.fiscal_yr = 11 and ss.raid = ra.id and st.ssid = ss.id')xml into result FROM dual;
On this both the reference to multiple tables and the concat function cause errors.
Thank you
Edited by: user583094 on Mar 2, 2011 3:36 PMHi,
for the concat do I use xmlconcat?No, XMLConcat is used to concatenate XMLType fragments.
The || operator will do fine, but you must escape any single quote inside the string :
SELECT DBMS_XMLGEN.getxml(
'SELECT ra.prefix ||''-''|| ra.suffix ||''-''|| ra.fiscal_yr as accession,
ss.date_in,
st.test
FROM rcv.recv_accessions ra,
ser.sero_samples ss,
ser.sero_tests st
WHERE ra.prefix = 8
AND ra.fiscal_yr = 11
AND ss.raid = ra.id
AND st.ssid = ss.id'
INTO result
FROM dual;Or, use the quoting operator to define a custom string delimiter :
SELECT DBMS_XMLGEN.getxml(
q'{SELECT ra.prefix ||'-'|| ra.suffix ||'-'|| ra.fiscal_yr as accession,
ss.date_in,
st.test
FROM rcv.recv_accessions ra,
ser.sero_samples ss,
ser.sero_tests st
WHERE ra.prefix = 8
AND ra.fiscal_yr = 11
AND ss.raid = ra.id
AND st.ssid = ss.id
INTO result
FROM dual;BTW, a good practice would be to use bind variables for the query. DBMS_XMLGEN can handle them nicely :
CREATE OR REPLACE FUNCTION get_xml
RETURN CLOB
IS
qryctx DBMS_XMLGEN.ctxHandle;
v_out CLOB;
qrystr VARCHAR2(4000) :=
'SELECT ra.prefix ||''-''|| ra.suffix ||''-''|| ra.fiscal_yr as accession,
ss.date_in,
st.test
FROM rcv.recv_accessions ra,
ser.sero_samples ss,
ser.sero_tests st
WHERE ra.prefix = :b_prefix
AND ra.fiscal_yr = :b_fiscal_yr
AND ss.raid = ra.id
AND st.ssid = ss.id';
BEGIN
qryctx := DBMS_XMLGEN.newContext(qrystr);
DBMS_XMLGEN.setBindValue(qryctx, 'b_prefix', '8');
DBMS_XMLGEN.setBindValue(qryctx, 'b_fiscal_yr', '11');
-- to generate empty elements if necessary :
DBMS_XMLGEN.setNullHandling(qryctx, DBMS_XMLGEN.EMPTY_TAG);
v_out := DBMS_XMLGEN.getXML(qryctx);
DBMS_XMLGEN.closeContext(qryctx);
RETURN v_out;
END; -
How to generate a query involving multiple tables(one left join others)
Hi, all,
I want to query a db like these:
I need all the demographics information(from table demo) and their acr info(from table acr), and their clinical info(from table clinical), and their lab info(from table lab).
The db is like this:
demo->acr: one to many
demo->clinical info: one to many
demo->lab info: one to many
I want to get one query result which are demo left join acr, and demo left join clinical, and demo left join lab. I hope the result is a record including demo info, acr info, clinical info, and lab info.
How could I do this in SQL?
Thanks a lot!
QianThank you very, very much!
Actually, I need a huge query to include all the tables in our db.
We are running a clinical db which collects the patients demographics info, clinical info, lab info, and many other information.
The Demographics table is a center hub which connects other tables. This is the main architecture.
My boss needed a huge query to include all the information, so others could find what they need by filtering.
As you have found, because one patients usually has multiple clinical/lab info sets, so the result will be multiplied! the number of result=n*m*k*...
My first plan is to set time point criteria to narrow all the records with one study year. If somebody needs to compare them, then I have to show them all.
So I have to know the SQL to generate a huge query including as many tables as possible.
I show some details here:
CREATE TABLE "IMMUNODATA"."DEMOGRAPHICS" (
"SUBJECTID" INTEGER NOT NULL,
"WORKID" INTEGER,
"OMRFHISTORYNUMBER" INTEGER,
"OTHERID" INTEGER,
"BARCODE" INTEGER,
"GENDER" VARCHAR2(1),
"DOB" DATE,
"RACEAI" INTEGER,
"RACECAUCASIAN" INTEGER,
"RACEAA" INTEGER,
"RACEASIAN" INTEGER,
"RACEPAC" INTEGER,
"RACEHIS" INTEGER,
"RACEOTHER" VARCHAR2(50),
"SSN" VARCHAR2(11),
PRIMARY KEY("SUBJECTID") VALIDATE
CREATE TABLE "IMMUNODATA"."ACR" (
"ID" INTEGER NOT NULL,
"THEDATE" DATE ,
"SUBJECTID" INTEGER NOT NULL,
"ACR_PAGENOTCOMPLETED" VARCHAR2(1000) ,
"ACR_MALARRASHTODAY" INTEGER ,
"ACR_MALARRASHEVER" INTEGER ,
"ACR_MALARRSHEARLIESTDATE" DATE ,
PRIMARY KEY("ID") VALIDATE,
FOREIGN KEY("SUBJECTID") REFERENCES "IMMUNODATA"."DEMOGRAPHICS" ("SUBJECTID") VALIDATE
CREATE TABLE "IMMUNODATA"."CLIN" (
"ID" INTEGER NOT NULL,
"THEDATE" DATE ,
"SUBJECTID" INTEGER NOT NULL,
"CLIN_PAGENOTCOMPLETED" VARCHAR2(1000) ,
"CLIN_FATIGUE" VARCHAR2(20) ,
"CLIN_FATIGUEDATE" DATE ,
"CLIN_FEVER" VARCHAR2(20) ,
"CLIN_FEVERDATE" DATE ,
"CLIN_WEIGHTLOSS" VARCHAR2(20) ,
"CLIN_WEIGHTLOSSDATE" DATE ,
"CLIN_CARDIOMEGALY" VARCHAR2(20) ,
PRIMARY KEY("ID") VALIDATE,
FOREIGN KEY("SUBJECTID") REFERENCES "IMMUNODATA"."DEMOGRAPHICS" ("SUBJECTID") VALIDATE
Other tables are alike.
Thank very much!
Qian -
How to use dynamic query for Result table
Hello Experts,
I want to use dynamic query and then display the result in the assignment block.
Using dynamic query BTQAct and BTQRAct and base on some search criteria i want tofilter and then append the result in the result table of that custom context node, and then it should display the result in the view in UI.
SO can you please provide me the samplle code on how to use the dynamic query and append in the result table.
Regards.Hi,
Please find below sample code:
data: query TYPE REF TO cl_crm_bol_dquery_service,
result TYPE REF TO if_bol_bo_col.
DATA: lt_params TYPE crmt_name_value_pair_tab,
lwa_params TYPE crmt_name_value_pair.
query = cl_crm_bol_dquery_service=>get_instance( 'BTQAct' ). " Get instance of dynamic query
Set general query parameter for maximum number of hits
lwa_params-name = 'MAX_HITS' .
lwa_params-value = '50'.
APPEND lwa_params TO lt_params.
query->set_query_parameters( it_parameters = lt_params ).
query->add_selection_param( iv_attr_name = 'OBJECT_ID'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = <lv_objectid>
iv_high = '' ). " Set your search criteria. Repeat this code if you have multiple parameters
"You can find possible search options for a query object in GENIL_BOL_BROWSER
result ?= query->get_query_result( ). " Get result from your search query
me->typed_context-> <your result context node>->set_collection( result ).
Here you will have to create a context node in your view which would refer to query result object like for BTQAct its BTQRAct
Hope this helps.
e Regards,
Bhushan -
How to use for loops with Multiple Initializers and Incrementers
I found that my for loop is printing out wrong, because I am using two for loops. I have searched but all I can find out is you can't use multiple inializers and increments, does anyone know how to get around this? How would I use an array for this?
Thanks very much for your help.
import java.util.Random;
import java.util.Arrays;
/** Generate numnodes value for random integers in the range 0..499. */
public final class RandomInteger {
public static final void main(String... aArgs){
log("Generating 6 random integers in range 0..499.");
int numnodes = 6;
//Randomly generate a number between 0 and 499 for the x and y coordinates for the nodes
Random randomGenerator = new Random();
for (int x = 0; x < numnodes; ++x) {
int randomInt = randomGenerator.nextInt(500);
Random randomGenerator2 = new Random();
for (int y = 0;y < numnodes; ++y) {
int randomInt2 = randomGenerator2.nextInt(500);
log("Generated : " + randomInt + " " + randomInt2);
log("Done.");
}Sorry that code works, but I want to use both my x and y coordinates to get a random number from 0 to 499 in both of them, then I want to do some comparisons of the values, then return it to another function. As it stands now, I get the wrong results when I run it, as you can see at the bottom.
Thanks very much for your help. I have been stumped all mornign on this and have looked everywhere trying to find an example. I don't won't to use math random. I am on a tight deadline to finish and at the rate I am going, I will not complete it.
/** Generate numnodes value for random integers in
the range 0..499. */
public final class RandomInteger {
public static final void main(String... aArgs){
log("Generating 6 random integers in range
0..499.");
int numnodes = 6;
//Randomly generate a number between 0 and 499 for
the x and y coordinates for the nodes
Random randomGenerator = new Random();
for (int x = 0; x < numnodes; ++x) {
int randomInt = randomGenerator.nextInt(500);
Random randomGenerator2 = new Random();
for (int y = 0;y < numnodes; ++y) {
int randomInt2 = randomGenerator2.nextInt(500);
log("Generated : " + randomInt + " " + randomInt2);
log("Done.");
private static void log(String aMessage){
System.out.println(aMessage);
Output:
--------------------Configuration:
<Default>--------------------
Generating 6 random integers in range 0..499.
Generated : 98 254
Generated : 98 347
Generated : 98 359
Generated : 98 25
Generated : 98 277
Generated : 98 148
Generated : 416 401
Generated : 416 165
Generated : 416 354
Generated : 416 169
Generated : 416 144
Generated : 416 354
Generated : 295 158
Generated : 295 138
Generated : 295 349
Generated : 295 324
Generated : 295 18
Generated : 295 193
Generated : 197 451
Generated : 197 416
Generated : 197 480
Generated : 197 33
Generated : 197 490
Generated : 197 494
Generated : 324 412
Generated : 324 490
Generated : 324 213
Generated : 324 386
Generated : 324 467
Generated : 324 163
Generated : 379 180
Generated : 379 446
Generated : 379 314
Generated : 379 52
Generated : 379 113
Generated : 379 271
Done.
Process completed. -
Background...
We have around 30 locations and we need to deliver different GPOs to these locations.
There can be between 3 and 8 PCs in each location.
These PCs can move around at short notice (mainly as a backup with neighbouring locations should
PCs fail)
The GPOs differ to change printers (2 per location and 2 backup printers from neighbouring location), auto login, desktop wallpaper
Which is in your opinion the best solution for login speed, GPO & device management?
1) Multiple OUs with a single GPO in each OU, the devices can be moved into new OU when the PCs move
2) Single OU with multiple GPOs, add devices to security group and use security filtering on the GPOs
3) Single OU with single GPO, add devices to security group and use item level targeting on the group> 1) Multiple OUs with a single GPO in each OU, the devices can be moved
> into new OU when the PCs move
> 2) Single OU with multiple GPOs, add devices to security group and use
> security filtering on the GPOs
> 3) Single OU with single GPO, add devices to security group and use item
> level targeting on the group
4) GPMC, Sites, "show sites". Then link appropriate GPOs to each
individual site.
That's the way to go here...
Martin
Mal ein
GUTES Buch über GPOs lesen?
NO THEY ARE NOT EVIL, if you know what you are doing:
Good or bad GPOs?
And if IT bothers me - coke bottle design refreshment :)) -
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
BaseTableName blank when calling GetSchema on a query with multiple tables
I am using ODP.NET 11.2.0.3.0 and when calling GetSchemaTable on a DataReader that contains a join the returned SchemaTable has the BaseTableName and BaseColumnName fields blank - this is different than what I see with the Oracle OLE DB Provider and with how SQL Server's native provider works. I can't find any discussion of this - is this on purpose or is it a bug? why does the available schema information vary so drastically between a single table query and a query with multiple tables joined?
Thanks,
Bryan HintonHi Bryan,
I am also facing the same issue. Did u find any work around or any suggestions will be well appreciated.
Thanks,
Naresh. -
Query about multiple connection pools under one database
Hi,
I have s query about connection pool, now we have a requirement,
we have two schemas in one db, some data store in one schema, some in another schema,
all tables are the same, but data is different, we want to retrive all data under two schemas,
so we need two connection pools under one database,
I have set two system DSN, and each connection pool was mapping to one DSN,
but after I importing tables into RPD, when I view data, there is a dialog let me select connection pool. so If this, when we drag columns in answer, it will definitely get wrong.
so how to realize this function about multiple connection pools under one database and we can get data normally.Hi,
Try this step
1)Better to create two different DSN for the same database with different user id and password
2)now create multiple connection pool in the same database in u r RPD physical layer .
also refer this link : for imporving performance
http://obiee101.blogspot.com/2009/01/obiee-multiple-connection-pools.html
http://gerardnico.com/wiki/dat/obiee/connection_pool
Thanks
Deva -
Search a text in a multiple tables and one table has BLOB column
Hi,
I couldn't find a solution/examples for below scenario in oracle text documentation or related forums.
I need to search a text in a multiple tables,in that one table has blob column which is used to store the documnents(pdf,doc,jpg..etc) and other tables have varchar2 columns,These tables have realation each other.
Please provide a sample examples for above scenario.
Thanks in advance..Have a look at my blog entry here:
https://blogs.oracle.com/searchtech/entry/indexing_data_from_multiple_tables
That describes two methods of achieving what you are looking for. -
How to fix Action Link Issue in Table and Pivot Table when used Section
My OBIEE Version: OBIEE 11.1.1.6.5
Issue Description: Action links (Navigate to BI Content) doesn't work in PIVOT TABLE or TABLE object when used Section area (one or more columns in Section area).
If you want to recreate this issue please follow next steps:
1. First of all you have to create one analyse with min 3 columns (for example Time.“Calendar date“, Product.Product, „Base Fact“. Revenue -> from Sample Sales Lite )
2. From column properties -> Set value Action Link Interaction on some column for example Product.Product (choose Navigate to BI Content -> any created BI report )
3. Click Results Tab choose Pivot Table and assigned one dimension column to Section area
4. Click preview icon
5. When you click on action link nothing happens
6. If you drug and drop column from Section Area to Excluded, Table or Pivot table Area then Action Link works perfectly
How to fix this issue?
I'll be grateful for any help!This is Bug:15922681 - ACTION LINK NAVIGATE TO BI CONTENT DOES NOT WORK WITH ATTRIBUTE IN SECTION
Upgrade to 11.1.1.6.6 will fix this issue. -
the query below , i am using in valueset :
select * from AR_LOCATION_VALUES
Where ar_location_values.location_segment_qualifier =
'COUNTRY' and ar_location_values.location_structure_id in ( select location_structure_id from ar_system_parameters )
how to use this query to set in R12?
Thankshi
i am using the following query in 11i and i want to use the same in R12 :
SELECT ar_location_values.location_segment_description,ar_location_values.location_segment_value,location_segment_id
FROM AR_LOCATION_VALUES
WHERE ar_location_values.location_segment_qualifier = 'COUNTRY'
AND ar_location_values.location_structure_id IN
(SELECT location_structure_id FROM ar_system_parameters)
note: the table ar_location_values is obsolette in R12 so what is the replacement table in R12 for this? -
How to query 2 hierarchical tables and join?
Hi
I've been bashing my head against a well to get this to work efficiently in 10g. I can solve the following writing some pretty horrible SQL, but can't figure out how to do it elegantly and optimally.
We have two hierarchical tables as follows:
select * from data_categories dac
dac_code name parent_dac_code
10 MANAGEMENT
20 MEDICATION 10
30 PROCEDURE 10
40 SURVEY
50 ASSESS
60 NATURE 50
70 OBSERVE 60
select * from data_elements des
des_id name parent_des_id dac_code display_seq
100 DOSE MEDICATION 1
110 1MG 100 1
120 2MG 100 2
130 3MG 100 3
140 ROUTE MEDICATION 2
150 ET 140 1
160 EM 140 2
170 RESPONSE MEDICATION 3
180 IMPROVED 170 1
190 NOCHANGE 170 2
200 FILED MANAGEMENT 1
210 INPUT OBSERVE 1
You'll note:
1) We have hierarchies in both tables, and a fk from data_elements to data_categories via the dac_code.
2) The depth of both data_categories and data_elements is unlimited.
3) There is no single root node record in either table.
4) The appropriate PK and FK indexes exist.
We need to write a query that returns the following results:
root_dac_code parent_dac_code des_level des_id name display_seq
ASSESS OBSERVE 1 210 INPUT 1
MANAGEMENT MEDICATION 1 100 DOSE 1
MANAGEMENT MEDICATION 2 110 1MG 1
MANAGEMENT MEDICATION 2 120 2MG 2
MANAGEMENT MEDICATION 2 130 3MG 3
MANAGEMENT MEDICATION 1 140 ROUTE 1
MANAGEMENT MEDICATION 2 150 ET 1
MANAGEMENT MEDICATION 2 160 EM 2
MANAGEMENT MEDICATION 1 170 RESPONSE 3
MANAGEMENT MEDICATION 2 180 IMPROVED 1
MANAGEMENT MEDICATION 2 190 NOCHANGE 2
MANAGEMENT MANAGEMENT 1 200 FILED 1
You'll also note we need to return the data in order of the root_dac_code, then parent_dac_code, followed by the display_seq.
Does anybody know how to write this query in an elegant and optimal manner?
Many thanks for any help!
Cheers,
CM.Flakey model.
Why does data_elements.dac_code appear to refer to data_categories.name rather than data_categories.dac_code?
You do not appear to be ordering by root_dac_code, parent_dac_code and display_seq (if you were MANAGEMENT/MANAGEMENT would not be at the end). Did you perhaps mean ORDER BY root_dac_code, des_id, display_seq?
Something like this perhaps?
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE data_categories (
2 dac_code NUMBER,
3 name VARCHAR2 (30),
4 parent_dac_code NUMBER);
Table created.
SQL> INSERT INTO data_categories VALUES (10, 'MANAGEMENT', NULL);
1 row created.
SQL> INSERT INTO data_categories VALUES (20, 'MEDICATION', 10);
1 row created.
SQL> INSERT INTO data_categories VALUES (30, 'PROCEDURE', 10);
1 row created.
SQL> INSERT INTO data_categories VALUES (40, 'SURVEY', NULL);
1 row created.
SQL> INSERT INTO data_categories VALUES (50, 'ASSESS', NULL);
1 row created.
SQL> INSERT INTO data_categories VALUES (60, 'NATURE', 50);
1 row created.
SQL> INSERT INTO data_categories VALUES (70, 'OBSERVE', 60);
1 row created.
SQL> CREATE TABLE data_elements (
2 des_id NUMBER,
3 name VARCHAR2 (30),
4 parent_des_id NUMBER,
5 dac_code VARCHAR2 (30),
6 display_seq NUMBER);
Table created.
SQL> INSERT INTO data_elements VALUES (100, 'DOSE', NULL, 'MEDICATION', 1);
1 row created.
SQL> INSERT INTO data_elements VALUES (110, '1MG', 100, NULL, 1);
1 row created.
SQL> INSERT INTO data_elements VALUES (120, '2MG', 100, NULL, 2);
1 row created.
SQL> INSERT INTO data_elements VALUES (130, '3MG', 100, NULL, 3);
1 row created.
SQL> INSERT INTO data_elements VALUES (140, 'ROUTE', NULL, 'MEDICATION', 2);
1 row created.
SQL> INSERT INTO data_elements VALUES (150, 'ET', 140, NULL, 1);
1 row created.
SQL> INSERT INTO data_elements VALUES (160, 'EM', 140, NULL, 2);
1 row created.
SQL> INSERT INTO data_elements VALUES (170, 'RESPONSE', NULL, 'MEDICATION', 3);
1 row created.
SQL> INSERT INTO data_elements VALUES (180, 'IMPROVED', 170, NULL, 1);
1 row created.
SQL> INSERT INTO data_elements VALUES (190, 'NOCHANGE', 170, NULL, 2);
1 row created.
SQL> INSERT INTO data_elements VALUES (200, 'FILED', NULL, 'MANAGEMENT', 1);
1 row created.
SQL> INSERT INTO data_elements VALUES (210, 'INPUT', NULL, 'OBSERVE', 1);
1 row created.
SQL> SELECT dc.root_dac_code, de.parent_dac_code,
2 de.des_level, de.des_id, de.name, de.display_seq
3 FROM (SELECT LEVEL des_level, des_id, name, parent_des_id,
4 CONNECT_BY_ROOT (dac_code) parent_dac_code, display_seq
5 FROM data_elements da
6 START WITH parent_des_id IS NULL
7 CONNECT BY PRIOR des_id = parent_des_id) de,
8 (SELECT CONNECT_BY_ROOT (name) root_dac_code, name dac_code
9 FROM data_categories
10 START WITH parent_dac_code IS NULL
11 CONNECT BY PRIOR dac_code = parent_dac_code) dc
12 WHERE de.parent_dac_code = dc.dac_code
13 ORDER BY dc.root_dac_code, de.des_id, de.display_seq;
ROOT_DAC_CODE PARENT_DAC_CODE DES_LEVEL DES_ID NAME
ASSESS OBSERVE 1 210 INPUT
MANAGEMENT MEDICATION 1 100 DOSE
MANAGEMENT MEDICATION 2 110 1MG
MANAGEMENT MEDICATION 2 120 2MG
MANAGEMENT MEDICATION 2 130 3MG
MANAGEMENT MEDICATION 1 140 ROUTE
MANAGEMENT MEDICATION 2 150 ET
MANAGEMENT MEDICATION 2 160 EM
MANAGEMENT MEDICATION 1 170 RESPONSE
MANAGEMENT MEDICATION 2 180 IMPROVED
MANAGEMENT MEDICATION 2 190 NOCHANGE
MANAGEMENT MANAGEMENT 1 200 FILED
12 rows selected.
SQL> -
Passing Multiple table row from one view to another view
Hi,
How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
thanx....Hi Ganesh,
Kindly do search before posting.. this discussed many times..
First create your context in component controller, and do context mapping in two views so that you can get values from
one veiw to any views.
and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
selection cardinality shoud be 0-n.
so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
Pelase check this...for multi selection
Re: How to copy data from one node to another or fromone table to another table
for navigation.. check
navigation between the views
Cheers,
Kris. -
Multiple table commit in one transaction
Hi ,
I have a issue with JDBC. I have about 5 tables to update which are related. So i am updating them as one set with multiple tables.
what i want is to commit to database once the first three tables are updated and then move on to the next 2 tables.
Is this possible
Regards
Nikhilhi
the xml looks like below
<root>
<stmt1>
<table1 action = "update_insert">
<table> AAA</table>
<access>
</access>
<key>
</key>
</table1>
<table2 action = "update_insert">
<table> BBB</table>
<access>
</access>
<key>
</key>
</table2>
</stmt1>
I have to use some thing like this because to mentain it as one transaction so that if one table update fails the whole transaction is roled back.
If you have any idea please do let me know
Regards
Nikhil
Maybe you are looking for
-
HT4519 How do I use one smtp server for multiple accounts?
I have 5 email accounts on my iPhone.Though they are different providers, I've been using the same smtp server. To simplify my life, I'd like to delete 4 servers. However, each is considered a Primary server and is undeletable. How do I get around th
-
Error: There are 1 nested errors: weblogic.management.ManagementException: Unable to obtain lock on /export/home/oracle/mdw4/user_projects/domains/base_domain/servers/AdminServer/tmp/AdminServer.lok. Server may already be running at weblogic.manageme
-
DynamicParameters doesn't transfer from iView
Dear experts. I had create iView for the Webdynpro ABAP application. I had created url to iView throwout the pcd at the end of url I had wrote ?DynamicParameter=sap-language%3DEN%26ztype%3DE. Navigation is worked perfectly but it is impssible to extr
-
Loading Movie Clip from a button
Hi, How do I load a movie clip from a button? So far on my button (b1), I have this AS: and I want the button to load the movie clip "char1." My button already has some AS: b2.onRollOver = function() { _root.captionFN(true, "Hi!", this); this.onRollO
-
I have set up an errorPage handler (ExceptionHandler.jsp) for my JSP page, Main.jsp. If the Main.jsp throws an exception from some of its early code, ExceptionHandler.jsp shows correctly. But if Main.jsp throws an exception later on in its code, its