JSF Best Prac.: Single ADF Query, Many Tables with Different Qry. Params
One query (ex. queryPeopleBySurnameFirstLetter) needs to be used multiple times on the same page to generate different tables. Each table represents a different letter (A,B,...Z) and would list the first 5 for that letter. Using design view, the first table is easy and prompts you for the query params on creation, but subsequent tables bind to that same request (and param).
This is just a sample, but this situation seems to effect a lot of developers (aka. our developers). Does anyone have any input on what is the easiest way for a someone to do this in JDeveloper? Is there a way to handle it all from the design view without having to manually change data bindings in the data definitions? Is there an existing tutorial that I'm missing?
Preemptive Thanks for Your Input,
Raymond
I think you'll need to go an change the pagedef in such a case to add further iterators.
But for the page scenario you are describing instead of having multiple queries, you can probably achieve it with a single query and a smart use of the af:foreach tag.
See: http://groundside.com/blog/DuncanMills.php?p=458&more=1&c=1&tb=1&pb=1#more458
and
http://kuba.zilp.pl/?id=61
Similar Messages
-
Too many tables with EXECUTE permision
Hi Gurus,
I found that my live databases has too many tables with EXECUTE permision. But I dont know how it happens: my query as follows:
select table_name
from dba_tab_privs
where owner='SYS' AND
privilege = 'EXECUTE' AND
grantee = 'PUBLIC'
result
TABLE_NAME
/598cc2d9_AWExceptionMessageRe
/24bd47b0_AWExceptionMessageRe
/b99e8561_AWExceptionMessageRe
/968869b8_AWExceptionMessageRe
/f8bf68b3_AWExceptionMessageRe
/9abd5a42_AWExceptionMessageRe
/5e83964b_AWExceptionMessageRe
/f01cb9e5_AWExceptionMessageRe
/380f765f_AWExpressCommandExce
/adef78c4_AWMemberExistsExcept
/5166f5c2_AWObjectExistsExcept
TABLE_NAME
oracle/AWXML/SparseDefinition
oracle/AWXML/ModelDimRef
/9d17934e_AWFunctionNotSupport
/d18d9de8_AWHandlerBaseTest
DBMS_AW_XML
INTERACTIONEXECUTE
CWM2_OLAP_INSTALLER
DBMS_XSOQ_ODBO
OLAPI_MDX_ROWSET_IMPL_T
OLAPI_MDX_ROWSET_TABLE
16444 rows selected.
==========================================================
Then I execute above query in other database. result was:
TABLE_NAME
STANDARD
UTL_HTTP
DBMS_PICKLER
DBMS_JAVA_TEST
UTL_FILE
UTL_RAW
UTL_TCP
UTL_INADDR
UTL_SMTP
DBMS_TRANSACTION
DBMS_SESSION
DBMS_DDL
DBMS_UTILITY
DBMS_SPACE
DBMS_ROWID
DBMS_PCLXUTIL
DBMS_APPLICATION_INFO
DBMS_OUTPUT
DBMS_DESCRIBE
DBMS_SQL
DBMS_EXPORT_EXTENSION
DBMS_JOB
DBMS_STATS
DBMS_ZHELP_IR
DBMS_PSP
DBMS_RULE
AQ$_AGENT
AQ$_DEQUEUE_HISTORY
AQ$_SUBSCRIBERS
AQ$_RECIPIENTS
AQ$_HISTORY
AQ$_NOTIFY_MSG
AQ$_DUMMY_T
DBMS_AQ_EXP_QUEUE_TABLES
DBMS_AQ_EXP_INDEX_TABLES
DBMS_AQ_EXP_TIMEMGR_TABLES
DBMS_AQ_EXP_HISTORY_TABLES
DBMS_AQ_EXP_SUBSCRIBER_TABLES
DBMS_AQ_EXP_QUEUES
DBMS_AQ_IMP_INTERNAL
DBMS_RMIN
DBMS_RESOURCE_MANAGER
DBMS_RESOURCE_MANAGER_PRIVS
DBMS_RMGR_PLAN_EXPORT
DBMS_RMGR_GROUP_EXPORT
DBMS_RMGR_PACT_EXPORT
LOW_GROUP
DEFAULT_CONSUMER_GROUP
DBMS_DEBUG_VC2COLL
DBMS_DEBUG
PBSDE
DBMS_SUMMARY
DBMS_SNAPSHOT
DBMS_REFRESH
DBMS_SNAPSHOT_UTL
DBMS_REFRESH_EXP_SITES
DBMS_REFRESH_EXP_LWM
DBMS_TRACE
DBMS_LOB
UTL_REF
UTL_COLL
ODCIPREDINFO
ODCIRIDLIST
ODCIINDEXCTX
ODCIARGDESCLIST
ODCIFUNCINFO
ODCISTATSOPTIONS
ODCICOLINFOLIST
ODCIOBJECT
ODCIOBJECTLIST
ODCIQUERYINFO
ODCICONST
SYSEVENT
DICTIONARY_OBJ_TYPE
DICTIONARY_OBJ_OWNER
DICTIONARY_OBJ_NAME
DATABASE_NAME
INSTANCE_NUM
LOGIN_USER
IS_SERVERERROR
SERVER_ERROR
DES_ENCRYPTED_PASSWORD
IS_ALTER_COLUMN
IS_DROP_COLUMN
GRANTEE
REVOKEE
PRIVILEGE_LIST
WITH_GRANT_OPTION
DICTIONARY_OBJ_OWNER_LIST
DICTIONARY_OBJ_NAME_LIST
IS_CREATING_NESTED_TABLE
CLIENT_IP_ADDRESS
DBMS_REPUTIL
DBMS_REPUTIL2
DBMS_OFFLINE_RGT
DBMS_REPCAT_RGT_EXP
DBMS_REPCAT_INSTANTIATE
DBMS_CRYPTO_TOOLKIT
DBMS_RANDOM
how come it happens? need help from u all !!!!!!!!!!you asked why you have such grant found in dba_tab_privs. Let's try to find DBMS_RANDOM (listed on your output) in $ORACLE_HOME/rdbms/admin:
cd $ORACLE_HOME/rdbms/admin
grep dbms_random *
dbmsrand.sql:CREATE OR REPLACE PACKAGE dbms_random AS
dbmsrand.sql: -- execute dbms_random.seed(12345678);
dbmsrand.sql: -- execute dbms_random.seed(TO_CHAR(SYSDATE,'MM-DD-YYYY HH24:MI:SS'));
dbmsrand.sql: -- my_random_number := dbms_random.random;
dbmsrand.sql: -- my_random_real := dbms_random.value;
dbmsrand.sql: -- select dbms_random.value from dual;
dbmsrand.sql: -- insert into a values (dbms_random.value);
dbmsrand.sql: -- execute :x := dbms_random.value;
dbmsrand.sql:END dbms_random;
dbmsrand.sql:CREATE OR REPLACE PACKAGE BODY dbms_random AS
dbmsrand.sql:END dbms_random;
dbmsrand.sql:CREATE OR REPLACE PUBLIC SYNONYM dbms_random FOR sys.dbms_random;
dbmsrand.sql:GRANT EXECUTE ON dbms_random TO public;
This is run by catproc.sql script which you run while creating database. -
ORA-00604 ORA-00904 When query partitioned table with partitioned indexes
Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
Query runs fine when query the partitioned table without partitioned indexes.
Here is the query.
SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
al27.accessory_code
FROM vlc.veh_vdc_accessorization_fact al1,
vlc.vdc_dim al2,
vlc.model_attribute_dim al7,
vlc.ppo_list_dim al18,
vlc.ppo_list_indiv_type_dim al23,
vlc.accy_type_dim al27
WHERE ( al2.vdc_id = al1.vdc_location_id
AND al7.model_attribute_id = al1.model_attribute_id
AND al18.mydppolist_id = al1.ppo_list_id
AND al23.mydppolist_id = al18.mydppolist_id
AND al23.mydaccytyp_id = al27.mydaccytyp_id
AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
AND al2.vdc_name IN
('PORT OF BALTIMORE',
'PORT OF JACKSONVILLE - LEXUS',
'PORT OF LONG BEACH',
'PORT OF NEWARK',
'PORT OF PORTLAND'
AND al27.accessory_code IN ('42', '43', '44', '45')
GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_codeI would recommend that you post this at the following OTN forum:
Database - General
General Database Discussions
and perhaps at:
Oracle Warehouse Builder
Warehouse Builder
The Oracle OLAP forum typically does not cover general data warehousing topics. -
How can I treat many tables with one handler(?) ?
Hello~
I am applying BDB to my embbeded system not rich in resource.
Some *.db files are called frequently.
But, Opening a *.db file [db_create(&dbp, NULL, 0) AND dbp->open] takes a long time in BDB
So, I loaded this functions onto a booting module to call opening functions just one time.
And all D/B handlers(?) are loaded in all run time
But, a D/B handler takes about 360Kbytes. And there are too many *.db files(10) where a table is
How can I treat many tables with one handler(?) ?
Or
If you have the most efficient way to call openning functions just one time, please tell me
Thank youHello,
Opening the database handles is expensive due to
opening a file on disk. Is it possible for the application
to use in-memory dbs? Otherwise is there a way for the application
to cache the DB handles and reduce the overhead associated with
opening and closing them?
Thank you,
Sandra -
Many to many join table with different column names
Hi have a joint table with different column names as foreign keys in the joining
tables...
e.g. i have a many to many reltnshp btwn Table A and Table B ..and join table
C
both have a column called pk.
and the join table C has columns call fk1 and fk2
does cmd require the same column name in the join table as in the joining table?
are there any workarounds?
thanksHI,
No, the foreign key column names in the join table do not have to match the primary
key names in the joined tables.
-thorick -
Joining two fact tables with different dimensions into single logical table
Hi Gurus,
I try to accomplish in Oracle Business Intelligence 11.1.1.3.0:
F1 (D1, D2 and D3)
F2 (D1 and D2 and D4)
And we want to build a report F1 F2 D1 D2 D3 D4 to have data for:
F1 that match only for D1-D2-D3
and data for
F2 that match only D1-D2-D4
all that in one row, so D3 and D4 are not common dimensions.
I can only do:
F3 (D1, D2)
F4 (D1, D2 and D4)
And report
F3 F4 D1,D2,D4 (all that in one row, and only D4 is not a common dimension)
Here is the very good example how to accomplish the scenario 1
http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
But looks like it does not work in 11.1.1.3.0
I get
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail: [,,Clients,,Day,ROI,,,,EW_Names,,,,,,,,,,,,,,,,,]. (HY000)
I am sure I set up everything correctly as advised in the blog but it works with only one not a common dimension
Is it a bug in 11.1.1.3.0 or something?
Thanks,
KateThanks for all your replies.
Actually, I've tried the solutions you guys mentioned. Generally speaking, the result should be displayed. However, my scenario is a little bit tricky.
table Y's figures are not the aggregation of table X for D dimension. Instead, table Y's figures include not only D dimension total, but also others (others do not mean A, B, C dimension). For example, table Y stores all food's figure, while table X stores only drink's figure. D dimension is only about drink's detail. In my scenario, other foods' figure is not provided.
So, even if I set D dimension to all/total for table X, table X's result is still not the same as table Y.
Indeed, table Y does not have a column key to join to D dimension's key. So, if I select D dimension and table Y's measures at the same time in BI Answer, result returns no data. Hence, I can't compare table X and table Y's results with selection of D dimension.
Is there any solution to solve this problem?
Edited by: TomChan on Jun 3, 2009 9:36 AM -
Create n tables with different number names
Hi guys, I work with SQL Server 2008 and OS Windows Server 2008 R2 64 bits. I have to create 10 tables with different names e.g. 'Image1', 'Image2', and so on. For this goal, I use a loop and concatenation. Here is the code:
DECLARE @i INT
DECLARE @v_table_n CHAR
SET @i=1
SET @v_table_n='Image'
WHILE (@i<=10)
BEGIN
DECLARE @STR VARCHAR(100)
SET @STR = 'CREATE TABLE SQL_DB_Filestream.dbo.Image1' + @v_table_n + CAST(@i AS VARCHAR(10)) + ' (
[ID_RowFeatVec] INTEGER NOT NULL PRIMARY KEY,
[CF1] FLOAT,
[CF2] FLOAT,
[CF3] FLOAT
EXECUTE @STR
SET @i = @i + 1;
END
GO
As a result, an error message appears:
"The name 'CREATE TABLE SQL_DB_Filestream.dbo.Image1I1 (
[ID_RowFeatVec] INTEGER NOT NULL PRIMARY KEY' is not a valid identifier."
I have tried a lot of versions but it doesn't work.
What am I doing wrong?
Best wishes
SV_proj>> I have to create 10 tables with different names e.g. 'Image1', 'Image2', and so on. For this goal, I use a loop and concatenation. Here is the code: <<
1) An SQL Programmer would write ten CREATE TABLE statements. Are you old enough to know about Rube Goldberg? He was a cartoonist who invented inanely complex device for simple task!
2) Ten identical tables is a huge design flaw. It is so awful I want to use it in one of my books. Tables are sets. A set is completed whole, or as Cantor said “a many that is treated as a one” (it sounds cool in German or Esperanto).
3) We hate loops in SQL. This is a declarative language. I will bet you have no idea what that means.
What you want to do is mimic a magnetic tape file system from the 1950's. We used to put a label on the tapes based on the date or a sequence number. Not a completed whole.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
BI Answers - need 2 compound layouts with tables with different columns
Hi,
I need 2 tables in the same report with different columns displaying. Is this possible?
I wanted to put them in their own compound layout and call each one with a view selector,
but it seems impossible to create a 2nd table with different columns in the one report.
Each time I try and replace one of the columns in the 2nd table with a different column,
a message appears saying the deleted column will be deleted from all views.
Many thanks for anyone's help.
- JennyAs per my knowledge - your requirement can be done with Pivot view but not with regular table view.
We dont have exclude column - functionality in table view.
Else, instead of creating in same report create the req. with 2 separ. reports but place them on single dashboard in 2 sep. sections. -
Performance between two partitionned tables with different structure
Hi,
I would like if there is a difference between two partitionned tables with different structure in term of performance (access, query, insertions, updates ).
I explain myself in detail :
I have a table that stores one value every 10 minutes in a day (so we have 144 values (24*6) in the whole day), with the corresponding id.
Here is the structure :
| Table T1 |
+ id PK |
+ date PK |
+ sample1 |
+ sample2 |
+ ... |
+ sample144 |
The table is partionned on the column date, with a partionned every months. The primary key is based on the columns (id, date).
There is an additionnal index on the column (id) (is it useful ?).
I would like to know if it is better to have a table with just (id, date, value) , so for one row in the first table we'll have 144 rows in the future? table. The partition will already be on the columns (id, date) with the index associated.
What are the gains or loss in performance with this new structure ( access, DMLs , storage ) ?
I discuss with the Java developers and they say it is simpler to manage in their code.
Oracle version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Thanks & Regards
From France
Oliver
Edited by: 998239 on 5 avr. 2013 01:59I mean storage in tablespaces and datafiles on disk.
Can you justify please and give me concrete arguments why the two structures are equivalent ( except inserting data in T(id, date,value))
because i have to make a report.i didnt say any thing like
two structures are equivalent ( except inserting data in T(id, date,value)i said
About structure : TABLE1(id, date, value) is better than TABLE1(id, date, sample1, .... sample144)because
1) oracle has restriction for numbers of column. Ok you can have 144 columns now but for future if you must have more than 1000 columns , what will you do?
2) Restrictions on Table Compression (Table compression is not supported for tables with more than 255 columns.)
3) store same type values on diffrent columns is bad practise
http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#i4383
i remember i seen Toms article about this but now i cant find it sorry ((( if i found i will post here -
How to compare two rows from two table with different data
how to compare two rows from two table with different data
e.g.
Table 1
ID DESC
1 aaa
2 bbb
3 ccc
Table 2
ID DESC
1 aaa
2 xxx
3 ccc
Result
2Create
table tab1(ID
int ,DE char(10))
Create
table tab2(ID
int ,DE char(10))
Insert
into tab1 Values
(1,'aaa')
Insert
into tab1 Values
(2,'bbb')
Insert
into tab1 Values(3,'ccc')
Insert
into tab1 Values(4,'dfe')
Insert
into tab2 Values
(1,'aaa')
Insert
into tab2 Values
(2,'xx')
Insert
into tab2 Values(3,'ccc')
Insert
into tab2 Values(6,'wdr')
SELECT
tab1.ID,tab2.ID
As T2 from tab1
FULL
join tab2 on tab1.ID
= tab2.ID
WHERE
BINARY_CHECKSUM(tab1.ID,tab1.DE)
<> BINARY_CHECKSUM(tab2.ID,tab2.DE)
OR tab1.ID
IS NULL
OR
tab2.ID IS
NULL
ID column considered as a primary Key
Apart from different record,Above query populate missing record in both tables.
Result Set
ID ID
2 2
4 NULL
NULL 6
ganeshk -
Single invoice for multiple orders with different divisions
Dear All,
while I am trying to do single invoice for muliple orders with different divisons invoice is gettting splitted..In copy control vbrk routine I tried with 003 and 007 etc..but result is same..what configuration need to be done for getting the single invoice
Thanks In advance
Regards
CNRNAIRHello
single invoice for multiple orders with "different divisions" invoice is getting split
FYI - Different Division means different Sales Area.
So, sales doc (whether sales order, Delivery & Billing) is applicable to EXACTLY one sales area.
Thus, combining docs with different sales area is practically impossible.
Provided, you are using common division.
Hope this assist you,
Thanks & REgards
JP -
Pass the internal table with different structures to the class module
Hi ,
I have created a class method to fill up the data in XML format. the method can be called from various programs with internal table with different structures. I want to pass it as dynamic How can I do that.
I tried to declare that as type any.
but not working.
regards,
MadhuriHi,
You could work with data reference.
Use GET REFERENCE OF itab INTO data_ref for passing the internal table to your method, and dereference it within the method with ASSIGN statement...
DATA: lr_data TYPE REF TO data.
GET REFERENCE OF itab INTO lr_data.
CALL METHOD meth EXPORTING pr_data = lr_data.
METHOD meth.
FIELD-SYMBOLS <fs> TYPE ANY TABLE
ASSIGN pr_data->* TO <fs>.
ENDMETHOD.
Kr,
Manu. -
Selecting data from single table with different condition in single query
Hi everybody...
I have one table with col1, col2, col3, col4, col5... as columns.
I want to select col1, col2, col3 with condition (x=y and a=b and c=d)
I want to select col4, col5 with condition (x=y and a=b and m=n )
in single query...
Thanx for ur helpGiven this data set...
SQL> select * from oddity
2 /
COL1 COL2 COL3 COL4 COL5 A X C M
1 2 3 4 5 B Y M
1 2 3 4 5 A Y C N
1 2 3 4 5 A Y D M
1 2 3 4 5 A Y D N
1 2 3 4 5 B Y D N
1 2 3 4 5 B Y D U
6 rows selected.
SQL>The following query meets the requirements. Of course, the requirements as stated are incomplete. I ahave assumed that we select all five columns if C=D andM=N.
SQL> SELECT decode(c, 'D', col1, '0') AS col1
2 , decode(c, 'D', col2, '0') AS col2
3 , decode(c, 'D', col3, '0') AS col3
4 , decode(m, 'N', col4, '-8') AS col4
5 , decode(m, 'N', col5, '-8') AS col5
6 FROM oddity
7 WHERE a = 'B'
8 AND x = 'Y'
9 /
COL1 COL2 COL3 COL4 COL5
0 0 0 -8 -8
1 2 3 4 5
1 2 3 -8 -8
SQL> Cheers, APC -
How to query on tables with certain name?
Hi,
I need to programmatically query some logging tables and then generate a report. These logging tables are all named E$_*. These E$_* tables have some common columns and some non-common columns. I don't know how many tables and what their full names are before hand.
What is the best way to do the query? And ideally, the query is database platform independent.
Thanks in advance!Hi,
I need to programmatically query some logging tables
and then generate a report. These logging tables are
all named E$_*. These E$_* tables have some common
columns and some non-common columns. I don't know how
many tables and what their full names are before
hand.
What is the best way to do the query? And ideally,
the query is database platform independent.Hi,
What do u mean by database platform independent? What are your expectations. Any examples? Also please post what you tried, so that we can try to correct it.
Jithendra -
Querying Nested Tables with Multiple other Tables
I am trying to query columns from a table and it's nested table and do a join to another table.
SELECT IM.*,
IMP.PROGRAM_ID,
S.STAGE_NAME
FROM TB_ITEM_MASTER IM , TABLE(TB_ITEM_MASTER.PROGRAMS) IMP, TB_STAGE S
WHERE S.STAGE_ID = IM.STAGE_ID
AND IM.PROGRAM_ID IN(1,2);
When running this query I receive the error:
ORA-00904:"TB_ITEM_MASTER"."PROGRAMS": Invalid Identifier
I actually copied this query straight from an Oracle Documentation, just replaced my table names with theirs. This query will almost be like a template to me as the program_id field in the Nested table is very cruicial to me. I will joining many tables to TB_ITEM_MASTER and using the where clause against program_id. What's the problem here?
Please advise.
ps. Did I mention how much I hate working with this Nested table stuff:(You must use the alias name, not the table name.
SQL> create type employee_obj as object (empno number) ;
2 /
Type created.
SQL> create type employees_nt is table of employee_obj ;
2 /
Type created.
SQL> create table departments (deptno number(2), dname varchar2(20), employees employees_nt)
2 nested table employees store as employees_table
3 /
Table created.
SQL> insert into departments values (1, 'DEPT #1', employees_nt(employee_obj(2), employee_obj(3))) ;
1 row created.
SQL> insert into departments values (22, 'DEPT #2', employees_nt(employee_obj(22), employee_obj(33))) ;
1 row created.
SQL>
SQL> SELECT IM.*,
2 IMP.empno
3 FROM departments IM , TABLE(IM.employees) IMP
4 WHERE IM.deptno IN(1,2);
DEPTNO DNAME
EMPLOYEES(EMPNO)
EMPNO
1 DEPT #1
EMPLOYEES_NT(EMPLOYEE_OBJ(2), EMPLOYEE_OBJ(3))
2
1 DEPT #1
EMPLOYEES_NT(EMPLOYEE_OBJ(2), EMPLOYEE_OBJ(3))
3
2 rows selected.
SQL>
Maybe you are looking for
-
Getting "Save File" permission message related to Report Generation Toolkit
I started having this problem about a month ago. It does not affect the operation of my project but is a minor nuisance, but a nuisance none the less. I opened a couple of Excel Specific VIs. I did not nor did I attempt to make any changes, I was
-
Facing issue in integration WFM 8.5.1 with UCCX 8.0.2
Hi I am trying to integrate WFM with UCCX but the integration is not successfll and WFM is not importing user from UCCX In the log file i am getting following error: [oocAgent] 11-22-2011 10:25:12 PM Handling server IPCC_Express [oocAgent] 11-22-201
-
I just installed my operating system (Ubuntu Linux 12.04, KDE desktop) three days ago, and installed Firefox yesterday. When I go to my Twitter feed, I get a bar at the top of the page saying "Sorry! We did something wrong. Please refresh the page an
-
How do I turn this off? I can't download anything until I put in the card's information. But the card doesn't work anymore, it ran out of money. It keeps saying that my last perchase was unseccessful or something. I just want this to stop so I can up
-
I have a webapp that will send an image that has been base64 encoded. Is there anyway to take the byte[] array from the base64 string / thing and get a nice healthy image ? Sincerely, Chem E