3 queries 3 tables and in a NON-relational DBMS
3 queries 3 tables and in a NON-relational DBMS
i got this msg box error:
Error prop_id is a invalid identifier.
basically i have querying form a non rel_dbms.
with this statement
select a.case_nbr, a.Aplc_id
from Tcase a
, tloc b
, tla_prop c
where c.plan_area_nbr = '1'
and b.loc_id = a.Prop_id
and a.Aplc_id = b.aplc_id
thanks for responding
here is the first
query.
select prop_id, plan_area_nbr
from tla_prop
where plan_area_nbr = '1'
then i got a bunch of prop_id's from tla_prop that has plan_area_nbr of 1
the second query will have
select aplc_id, loc_id
from tloc
where loc_id is equal/the same prop_id from the table tla_prop
the third selection
will contain aplc_id from table tcase = aplc_is from the table tloc
select case_nbr, Aplc_id
from Tcase
where Aplc_id = Secondselection.prop_id
the goal is really to get the case_nbr with all criterias from query1,2,3 and table 1,2,3.
any ideas?
hmm, thanks in advance
Hi
Try this:
select a.case_nbr, a.Aplc_id
from Tcase a , tloc b , tla_prop c
where c.plan_area_nbr = '1'
and b.loc_id = c.Prop_id
and a.Aplc_id = b.aplc_id
Ott Karesz
http://www.trendo-kft.hu
Similar Messages
-
Ora-01219 database not open; only queries on fixed tables and views.
Hi everyone
There is another post stating this error, but since the source is different, I think is okay to make a different post as well.
Our database was working fine until the other day, when suddenly power went off, UPS was damaged and didn't hold, and when we restarted the database this is what happens:
Using Enterprise Manager Console, we can make a succesful connection in the same machine, but if we choose Schema, the following error appears:
ora-01219 database not open; only queries on fixed tables and views.
When accesing from a different machine:
ORA-01033: ORACLE initialization or shutdown in progress
Thanks in advanceHere is the last entries of alert log
Fatal NI connect error 12638, connecting to:
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.1.0.7.0 - Production
Time: 20-JUL-2010 15:48:31
Tracing not turned on.
Tns error struct:
ns main err code: 12638
TNS-12638: Fallo de recuperación de credenciales
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Tue Jul 20 15:50:50 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 11.1.0.7.0.
Using parameter settings in server-side spfile E:\ORACLE\CRIMINALISTICA\PRODUCT\11.1.0\DB_1\DATABASE\SPFILECRIM.ORA
System parameters with non-default values:
processes = 150
memory_target = 816M
control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL01.CTL"
control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL02.CTL"
control_files = "E:\ORACLE\ORADATA\CRIM\CONTROL03.CTL"
db_block_size = 8192
compatible = "11.1.0.0.0"
db_recovery_file_dest = "E:\Oracle\flash_recovery_area"
db_recovery_file_dest_size= 2G
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=CRIMXDB)"
audit_file_dest = "E:\ORACLE\ADMIN\CRIM\ADUMP"
audit_trail = "DB"
db_name = "CRIM"
open_cursors = 300
diagnostic_dest = "E:\ORACLE"
Tue Jul 20 15:50:55 2010
PMON started with pid=2, OS id=1688
Tue Jul 20 15:50:55 2010
VKTM started with pid=3, OS id=2236 at elevated priority
Tue Jul 20 15:50:55 2010
DIAG started with pid=4, OS id=2332
Tue Jul 20 15:50:55 2010
DBRM started with pid=5, OS id=2328
Tue Jul 20 15:50:55 2010
PSP0 started with pid=6, OS id=2432
VKTM running at (20)ms precision
Tue Jul 20 15:50:55 2010
DIA0 started with pid=7, OS id=2160
Tue Jul 20 15:50:55 2010
MMAN started with pid=8, OS id=2156
Tue Jul 20 15:50:55 2010
DBW0 started with pid=9, OS id=2064
Tue Jul 20 15:50:55 2010
LGWR started with pid=10, OS id=3176
Tue Jul 20 15:50:55 2010
CKPT started with pid=11, OS id=3180
Tue Jul 20 15:50:55 2010
SMON started with pid=12, OS id=3184
Tue Jul 20 15:50:55 2010
RECO started with pid=13, OS id=3188
Tue Jul 20 15:50:55 2010
MMON started with pid=14, OS id=3192
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = E:\Oracle
Tue Jul 20 15:50:55 2010
MMNL started with pid=15, OS id=3196
Tue Jul 20 15:50:56 2010
alter database mount exclusive
Setting recovery target incarnation to 2
Successful mount of redo thread 1, with mount id 1304879008
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
ORA-01110: data file 9: 'E:\ORACLE\ORADATA\STOPCRIM5\STOPCRIM5TABLESPACE.ORA'
ORA-27047: unable to read the header block of file
OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
ORA-01157: cannot identify/lock data file 16 - see DBWR trace file
ORA-01110: data file 16: 'E:\ORACLE\ORADATA\PRUEBACARLOS\PRUEBACARLOSTABLESPACE.ORA'
ORA-27047: unable to read the header block of file
OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
Errors in file e:\oracle\diag\rdbms\crim\crim\trace\crim_dbw0_2064.trc:
ORA-01157: cannot identify/lock data file 17 - see DBWR trace file
ORA-01110: data file 17: 'E:\ORACLE\ORADATA\PRUEBACARLOS\PRUEBACARLOSINDEX.ORA'
ORA-27047: unable to read the header block of file
OSD-04006: fallo de ReadFile(); no se ha podido leer del archivo
O/S-Error: (OS 38) Se ha alcanzado el final del archivo.
ORA-1157 signalled during: alter database open...
Tue Jul 20 16:04:39 2010
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup. -
2.1.1 and 3.0 EA2: No tables shown for a non-dba user on 11R2
Hi all
I'm experiencing a strange problem with one 11R2 DB standard edition installation on Windows 2008 32-bit.
Versions are:
Windows
Windows 2008 SP2 32 bit (build 6002)
Oracle
Oracle Database 11g Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Java
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
The DB has some users, to whom some tables belong.
If I run SQL Developer (either 2.1.1 or 3.0 EA2) on the server (as windows administrator), and create a connection using one of the non-dba users credentials, clicking on the Tables (filtered view) leaf, does not show any table, even if they are on the DB (e.g. using sqlplus from command line and doing a select table_name from user_tables shows the entire list, and I can select, insert, delete and so on).
If I connect from my pc (I have 10g client installed), it works perfectly, i.e. I see the list of tables, and I can operate on them as expected.
Conversely, on 11R2 another installation (Oracle Enterprise Edition on Windows 2003 Enterprise), both versions of sqldeveloper work fine on the server machine. Here versions are:
Windows
Windows 2003 R2 Enterprise Edition SP2 build 3790
Oracle
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Java
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
What could be wrong here? Is there any way to debug it?
Thanks in advance
Ciao
AndreaI run sqldeveloper.bat as instructed by you.
These are the results. The error appears only when starting sqldeveloper. When I expand tables I see nothing.
C:\sqldeveloper\sqldeveloper\bin>java -Xmx640M -Xms128M -Xverify:none -Doracle.i
de.util.AddinPolicyUtils.OVERRIDE_FLAG=true -Dsun.java2d.ddoffscreen=false -Dwin
dows.shell.font.languages= -XX:MaxPermSize=128M -Dide.AssertTracingDisabled=true
-Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true -Djava.util.logging.confi
g.file=logging.conf -Dsqldev.debug=false -Dide.conf="./sqldeveloper.conf" -Dide.
startingcwd="." -classpath ../../ide/lib/ide-boot.jar oracle.ide.boot.Launcher
Exception initializing 'oracle.dbtools.raptor.plsql.PLSQLAddin' in extension 'Or
acle SQL Developer': java.lang.NoClassDefFoundError: com/sun/jdi/Bootstrap
at oracle.jdevimpl.debugger.jdi.DebugJDIConnector.getVersion(DebugJDICon
nector.java:30)
at oracle.jdevimpl.debugger.support.DebugFactory.<clinit>(DebugFactory.j
ava:81)
at oracle.dbtools.raptor.plsql.PLSQLAddin.initialize(PLSQLAddin.java:87)
at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
rImpl.java:407)
at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
erImpl.java:214)
at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
dinManagerImpl.java:128)
at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1949)
at oracle.ide.IdeCore.startupImpl(IdeCore.java:1573)
at oracle.ide.Ide.startup(Ide.java:703)
at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
at oracle.ideimpl.Main.start(Main.java:184)
at oracle.ideimpl.Main.main(Main.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.ide.boot.PCLMain.callMain(PCLMain.java:62)
at oracle.ide.boot.PCLMain.main(PCLMain.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
189)
at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:89)
at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:65)
at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.ide.boot.Launcher.invokeMain(Launcher.java:713)
at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
at oracle.ide.boot.Launcher.launch(Launcher.java:68)
at oracle.ide.boot.Launcher.main(Launcher.java:57)
Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
Classe mancante: com.sun.jdi.Bootstrap
Classe dipendente: oracle.jdevimpl.debugger.jdi.DebugJDIConnector
Loader: ide-global:11.1.1.0.0
Origine codice: /C:/sqldeveloper/jdev/extensions/oracle.jdeveloper.r
unner.jar
Configurazione: extension jar in C:\sqldeveloper\jdev\extensions
Questo caricamento Þ stato iniziato alle ide-global:11.1.1.0.0 utilizzando il me
todo loadClass().
La classe mancante non Þ disponibile in nessuna origine codice o loader nel sist
ema.
at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassL
oader.java:2190)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoa
der.java:1733)
at oracle.classloader.PolicyClassLoader.access$000(PolicyClassLoader.jav
a:143)
at oracle.classloader.PolicyClassLoader$LoadClassAction.run(PolicyClassL
oader.java:331)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java
:1692)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java
:1674)
... 35 more
Thanks for your help. -
OBIEE bypasses smaller aggregate table and queries largest aggregate table
Hello,
Currently we are experiencing something strange regarding queries that are generated.
Scenario:
We have 1 detail table and 3 aggregate tables in the RPD. For this scenario I will only refer to 2 of the Aggregates.
Aggregate 1 (1 million rows):
Contains data - Division, Sales Rep, Month, Sales
Aggregate 2 (13 milliion rows):
Contains data - Division, Product, Month, Sales
Both tables are set at the appropriate dimension levels in the Business Model. Row counts have been updated in the physical layer in the RPD.
When we create an answers query that contains Division, Month and Sales, one would think that OBIEE would query the smaller and faster of the two tables. However, obiee wants to query the table with 13 million records completely bypassing the smaller table. If we make the larger aggregate inactive, then OBIEE queries the smaller table. We can't figure out why OBIEE wants to immediately go to the larger table.
Has anyone experienced something such as this? Any help would be greatly appreciated.
Edited by: gwb on Aug 19, 2009 7:45 AMHave you try to change the sort order of the logical table source in your logical table ?
!http://gerardnico.com/wiki/_media/temp/obiee_logical_table_sources_sort.jpg!
Set the Aggregate 1 first.
Cheers
Nico -
Spatial Tables and Remote Queries
Hi Experts,
Can anyone explain me when and where to use Spatial Tables and Remote Queries with some examples.
Thanks in advance.Hi,
there are some nice demos from Andrejus:
http://andrejusb.blogspot.com/search/label/Spatial
Hope it helps,
Friedhold -
Problem with Join Queries using PHP and an Orcale Database
Ok, I am trying to build a simple php querying tool for my oracle database and for the most part it is working however I am having a problem getting data from my join queries. If I run the following query :
QUERY:
SELECT lastfirst,EnteredBy,Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
Lastfirst EnteredBy Debit
caiu, test 204 1
But when I run the query correctly I get no results
QUERY:
SELECT sts.lastfirst,gl.EnteredBy,gl.Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
sts.lastfirst gl.EnteredBy gl.Debit
and if I run the query combining the two above methods and adding a field (schoolid) that has the same name on both table I get the following result sets
QUERY:
SELECT lastfirst,EnteredBy,Debit,sts.schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
lastfirst EnteredBy Debit sts.schoolid
caiu, test 204 1
QUERY:
SELECT lastfirst,EnteredBy,Debit,schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
NONE
Therefore, I have to have something written incorrectly in my php code and I just can not figure it out. My entire code is pasted below please provide me with an assistance you might have to offer. I have change the odbc_connec line so I could post it to this forum. In addition, I had to phrase out the column headers there for when you write the column headers you have to use ~ instead of , as the separator and then I turn back into the correct format for sql.
//These scripts just open help windows if somone clicks on the icon
<script>
function submit()
{document.sqlform.submit();}
</script>
<script>
function colwin(){
window.open("colnames.php",null,"height=300,width=400,scrollbars=1");}
</script>
<script>
function tabwin(){
window.open("tablenames.php",null,"height=300,width=400,scrollbars=1");}
</script>
<script>
function help(){
window.open("http://www.w3schools.com/sql/default.asp",null,"height=500,width=700,scrollbars=1");}
</script>
<form method="post" action="<?php echo $PHP_SELF;?>" name="sqlform">
<?php
//Cookie to check for authorization to the site
if($_COOKIE['cookie']=="CheckCookieForAuth")
//These get the values of the textareas after the form has been submitted
$sqlSELECT = $_POST["SELECT"];
$sqlFROM = $_POST["FROM"];
$sqlJOIN = $_POST["JOIN"];
$sqlWHERE = $_POST["WHERE"];
$sqlOTHER = $_POST["OTHER"];
$sqlSELECTTYPE = $_POST["SELECTTYPE"];
//This is the variable used to parse out my headers the user entered
$sqlColNames = split('~',$sqlSELECT);
//This converts the ~ separator to , so I can actually use it as part of my sql string
$search = array('~');
$replace = array(',');
$mystring = $sqlSELECT;
$sqlString = str_replace($search, $replace, $mystring);
//These are the textareas and the drop down options that the end users has to create queries
echo "<table border=0>";
echo "<tr><td valign='top'>";
echo "<B>SELECT TYPE</B> <BR><SELECT NAME=SELECTTYPE>
<OPTION VALUE='SELECT' SELECTED>SELECT</OPTION>
<OPTION VALUE='SELECT DISTINCT'>SELECT DISTINCT</OPTION>
<OPTION VALUE='INSERT'>INSERT</OPTION>
<OPTION VALUE='UPDATE'>UPDATE</OPTION>
<OPTION VALUE='DELETE'>DELETE</OPTION>
</SELECT>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=SELECT wrap=physical>$sqlSELECT</textarea>";
echo "</td><td valign='top'>";
echo "<img src='images/sqlC.jpg' width='25' height='25' onclick='colwin()'>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>FROM</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=FROM wrap=physical>$sqlFROM</textarea>";
echo "</td><td valign='top'>";
echo "<img src='images/sqlT.jpg' width='25' height='25' border=0 onclick='tabwin()'>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>JOIN</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=JOIN wrap=physical>$sqlJOIN</textarea>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>WHERE</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=WHERE wrap=physical>$sqlWHERE</textarea>";
echo "</td></tr>";
//This is where the end user would enter group by, having, order by, etc..
echo "<tr><td valign='top'>";
echo "<b>OTHER</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=OTHER wrap=physical>$sqlOTHER</textarea>";
echo "</td></tr>";
This is a run query icon and a help icon
echo "<tr><td colspan=2 align=right>";
echo "<img src='images/RunQuery.jpg' width='30' height='28' onclick='submit()'> <img src='images/qm.jpg' border=0 width='25' height='25' onclick='help()'>";
echo "</td></tr></table>";
echo "<br>";
echo "<br>";
//This is where I connect to my remote oracle database
$conn=odbc_connect('ODBC_ConnectionName','USERNAME','PASSWORD');
//This is the sql string created by the end users
$sql="$sqlSELECTTYPE $sqlString FROM $sqlFROM $sqlJOIN $sqlWHERE $sqlOTHER";
//This executes the connection string and the sql string
$rs=odbc_exec($conn,$sql);
//This will display the query or a message if the query is empty
if($rs!=NULL){
echo "<table border=1>";
echo "<tr>";
//This loops through the string array the end user enter the field name text area to get column headers
for($i=0; $i<count($sqlColNames); $i++)
echo "<td>";
print_r($sqlColNames[$i]);
echo "</td>";
echo "</tr><tr>";
//This actually fetchs the rows from the statement and then display the data based on the column names the end user speificed
while (odbc_fetch_row($rs))
for($i=0; $i<count($sqlColNames); $i++)
$results=odbc_result($rs,$sqlColNames[$i]);
echo "<td>$results</td>";
echo "</tr>";
odbc_close($conn);
echo "</table>";}else{echo "Results will be displayed here";}
echo "<br><br>";
echo $sql;
else
echo "Not logged in";
?>
</form>This looks more like a SQL question than a PHP issue. There are a couple of JOIN examples at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2066611 that might you work through the problem.
-
How to send two seperate queries from OBI and combine the results
Hello all,
I am trying to understand how to combine results of two queries in OBI. Here is the scenario.
There are three tables, User, Security Roles joined though a Bridge Table Role_User
Each user has multiple roles, The roles to which a user has access is identified by a flag column with value T or else it will have value F.
I am trying to create an analysis as below
User Id
Roles with Access
Roles without Access
So column 2 will show all the roles with flag T for particular user and column 2 will show all the roles with flag F for same user.
I tried creating two Fact tables and using Filter condition on the flag value, but in analysis I could only use one at a time. When I add both the columns , I get error as None of the fact table are compatible with the query request. I do have hierarchies created for the dimensions and assigned them in the content level for all dims and facts.
Any hint will be highly appreciated.
ThanksGot the solution. I am posting it here in case anyone face similar issue.
I added this SQL code in the advanced tab:
Select A.saw_0 saw_0, A.saw_1 saw_1, B.saw_1 saw_2
FROM( Select Col1 saw_0,Col2 saw_1 FROM Table1) A LEFT OUTER JOIN
(Select Col1 saw_0,Col2 saw_1 FROM Table2) B
on A.saw_0=B.saw_0
I created to Logical Facts using same source with two different filter conditions and used them with sub-query as above
Ref: OBIEE Interviews: Reports -
How to partition tables and indexes in this scenario?
So our situation is pretty simple. We have 3 tables.
A, B and C
the model is A->>B->>C
Currently A, B and C are range partitioned on a key created_date however it's typical that only C is every qualfied with created date. There is a foreign key from B -> A and C -> B
we have many queries where the data is identified by state that is indexed currently non partitioned on columns in A ... there are also indexes on the foreign keys that get from C -> B -> A. Again these are non partitioned indexes at this time.
It is typical that we qualify A on either account or user or both. There are indexes (non partitioned) on these
We have a problem now because many of the queries use leading wildcards ie. account like '%ACCOUNT' etc. This often results in large full table scans. Our solution has been to remove the leading wildcard but this isn't always possible.
We are wondering how we can benefit from partitioning and or sub partitioning table A. since it's partitioned on created_date but rarely qualify by that.
We are also wondering where and how we can benefit from either global partitioned index or local partitioned indexes on tables A. We suspect that the index on the foreign key from C to B could be a local partitioned index.
I am also wondering what impact pushing the state from A that's used to qualify A down to C would have any advantage.
C is the table that currently we qualify with the partition key so I figure if you also pushed down the state from A that's used to qualify the set of C's we want based on the set of B's we want based on the set of A thru qualfying on columns within A.
If we push down some of those values to C and simply use C when filtering I'm wondering what the plans will look like compared to having to work all the way up from the bottom to the top before it begins qualifying A.
Edited by: steffi on Jan 14, 2011 11:36 PMWe are wondering how we can benefit from partitioning and or sub partitioning table A. since it's partitioned on >created_date but rarely qualify by that. Very good question. Why did you partition on it? You will never have INSERTS on these partitions, but maybe deletes and updates? The only advantage (I can think of) would be to set these partitions in a read only tablespace to ease backup... but that's a weired reason.
we have many queries where the data is identified by state that is indexed currently non partitioned on columns in >A ... there are also indexes on the foreign keys that get from C -> B -> A. Again these are non partitioned indexes at >this time.Of course. Why should they be partitioned by Create_date?
It is typical that we qualify A on either account or user or both. There are indexes (non partitioned) on these
We have a problem now because many of the queries use leading wildcards ie. account like '%ACCOUNT' etc. This >often results in large full table scans. Our solution has been to remove the leading wildcard but this isn't always possible.I would suspect full index scan. Isn't it?
We are also wondering where and how we can benefit from either global partitioned index or local partitioned >indexes on tables A. We suspect that the index on the foreign key from C to B could be a local partitioned index.As A is not accessed by any partition, why should C and B profit? You should look to partition by the key you are using to access. But, you are looking to tune your SQLs where the access is like '%ACCOUNT' on A. Then when there is a match. ORACLE joins via your index and nested loop (right?) to B and C.
I am also wondering what impact pushing the state from A that's used to qualify A down to C would have any >advantage.Why should it. It just makes the table and indexes larger => more IO.
C is the table that currently we qualify with the partition key so I figure if you also pushed down the state from A >that's used to qualify the set of C's we want based on the set of B's we want based on the set of A thru qualfying >on columns within A.If the access from A to C would be .. AND A.CREATE_DATE =C.CREATE_DATE and c.key like '%what I want%' which does not qualifify for a FK ;-) then, as that could be resulting in a partition scan, you could "profit". But, I'm sure that's not your model.
If we push down some of those values to C and simply use C when filtering I'm wondering what the plans will look >like compared to having to work all the way up from the bottom to the top before it begins qualifying A.So you want to denormalize A,B,C and into one table? With the same access is like '%ACCOUNT' you would get a full scan on an index as before, just the objects would be larger due to redundance and harder to maintain. In the end you would have a bad and slower design.
Maybe you explain what the problem is.
Full index scan can not be avoided, but that can be made faster by e.g. parallel query, and then the join to B and C should be a "snip" if you just identify a small subset of rows in these tables. -
Urgent help needed!! Layout table and Draw layout cell dissapeared.
I need some urgent help. I'm using CS3 but for a while my
Layout Table and Draw Layout Cell icons appear greyed and can't use
them at all. Is there any kind soul out there who knows how to fix
this? I'm going nuts trying all the possible options but none seem
to work.
Help please!!!!!!> How would you about designing a page without using html?
You don't. But I don't recall suggesting that you not use
HTML. I just
suggested that you use best-practice HTML, no? Or maybe you
meant to ask
how you would go about building your site without learning
HTML? In that
case, I think you are outta luck. Using DW without knowing
HTML is a very
punishing experience, I'm afraid.
> PS: A virtual box of 12 bottles of Moet Chandon is
already on your way!!
I'd prefer Cristal, please.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Untersberg" <[email protected]> wrote in
message
news:g4tj9a$m5o$[email protected]..
> Ahhhhhh!!!!! They came up!!!! They came up again!!
> I was on standard mode. Now going back to your
suggestion, which I really
> appreciate. How would you about designing a page without
using html? I'm
> just
> redesigning my website at the moment and need it to get
going urgently,
> hence
> the reluctance to start learning HTML at the moment.
I'll do after but I
> need
> to get this up and running fairly quickly.
>
> Cheers.
>
> PS: A virtual box of 12 bottles of Moet Chandon is
already on your way!!
> -
Here's how to do ALV (OO) with dynamic fcat, int table and editable data
Hi everybody
Here's a more useful approach to ALV grid with OO using dynamic table, data NOT from DDIC, dynamic FCAT and how to get changed lines from the grid when ENTER key is pressed.
It's really not too dificult but I think this is more useful than the ever present SFLIGHT methods from the demos.
This also defines a subclass of cl_gui_alv_grid so you can access the protected attributes / methods of that class.
You don't need to add the class via SE24 -- done fron this ABAP.
When you run it click Edit for the first time.
After editing data press ENTER and the break point should bring you into the relevant method.
Code developed on NW2004S trial version but also works on rel 6.40 on a "Real" system.
The code should work without any changes on any system >=6.40.
All you need to do is to create a blank screen 100 via SE51 with a custom container on it called CCONTAINER1.
The rest of the code can just be uploaded into your system using the SE38 upload facility.
When running the program click on the EDIT button to enable the edit functionality of the grid.
Change your data and when you press ENTER you should get the break-point where you can see the original table and changed rows.
This program is actually quite general as it covers Dynamic tables, building a dynamic fcat where your table fields are NOT in the DDIC, intercepting the ENTER key via using an event, and accessing the protected attributes of the cl_gui_alv_grid by defining a subclass of this class in the abap.
I've seen various questions relating to all these functions but none in my view ever answers the questions in a simple manner. I hope this simple program will answer all these and show how using OO ALV is actually quite easy and people shouldn't be scared of using OO.
Have fun and award points if useful.
Cheers
Jimbo.
<b>PROGRAM zdynfieldcat.
Simple test of dynamic ITAB with user defined (not ddic) fields
Build dynamic fcat
use ALV grid to display and edit.
*When edit mode set to 1 toolbar gives possibility of adding and
*deleting rows.
*Define subclass of cl_gui_alv_grid so we can use protected attributes
*and methods.
Add event handler to intercept user entering data and pressing the
*ENTER key.
When enter key is pressed get actual value of NEW table (all rows)
rather than just the changed data.
*use new RTTI functionality to retrieve internal table structure
*details.
Create a blank screen 100 with a custom container called CCONTAINER1.
James Hawthorne
include <icon>.
define any old internal structure NOT in DDIC
types: begin of s_elements,
anyfield1(20) type c,
anyfield2(20) type c,
anyfield3(20) type c,
anyfield4(20) type c,
anyfield5(11) type n,
end of s_elements.
types: lt_rows type lvc_t_roid.
Note new RTTI functionality allows field detail retrieval
at runtime for dynamic tables.
data: wa_element type s_elements ,
wa_data type s_elements,
c_index type sy-index,
c_dec2 type s_elements-anyfield5,
wa_it_fldcat type lvc_s_fcat,
it_fldcat type lvc_t_fcat,
lr_rtti_struc TYPE REF TO cl_abap_structdescr, "RTTI
lt_comp TYPE cl_abap_structdescr=>component_table,"RTTI
ls_comp LIKE LINE OF lt_comp, "RTTI
zog like line of lr_rtti_struc->components, "RTTI
struct_grid_lset type lvc_s_layo,
l_valid type c,
new_table type ref to data.
field-symbols: <dyn_table> type standard table,
<actual_tab> type standard table,
<fs1> type ANY,
<FS2> TYPE TABLE.
data: grid_container1 type ref to cl_gui_custom_container.
class lcl_grid_event_receiver definition deferred.
data: g_event_receiver type ref to lcl_grid_event_receiver.
data: ls_modcell type LVC_S_MODI,
stab type ref to data,
sdog type s_elements. .
class lcl_grid_event_receiver definition.
public section.
methods:
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed,
toolbar for event toolbar of cl_gui_alv_grid
importing e_object
e_interactive,
user_command for event user_command of cl_gui_alv_grid
importing e_ucomm.
endclass.
*implementation of Grid event-handler class
class lcl_grid_event_receiver implementation.
method handle_data_changed.
code whatever required after data entry.
various possibilites here as you can get back Cell(s) changed
columns or the entire updated table.
Data validation is also possible here.
perform check_data using er_data_changed.
endmethod.
Method for handling all creation/modification calls to the toolbar
method toolbar.
data : ls_toolbar type stb_button.
Define Custom Button in the toolbar
clear ls_toolbar.
move 0 to ls_toolbar-butn_type.
move 'EDIT' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Edit' to ls_toolbar-text.
move icon_change_text to ls_toolbar-icon.
move 'Click2Edit' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.
clear ls_toolbar.
move 0 to ls_toolbar-butn_type.
move 'UPDA' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Update' to ls_toolbar-text.
move icon_system_save to ls_toolbar-icon.
move 'Click2Update' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.
clear ls_toolbar.
move 0 to ls_toolbar-butn_type.
move 'EXIT' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Exit' to ls_toolbar-text.
move icon_system_end to ls_toolbar-icon.
move 'Click2Exit' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.
endmethod.
method user_command.
case e_ucomm .
when 'EDIT'. "From Tool bar
perform set_input.
perform init_grid.
when 'UPDA'. "From Tool bar
perform refresh_disp.
perform update_table.
when 'EXIT'. "From Tool bar
leave program.
endcase.
endmethod.
endclass.
class zcltest definition inheriting from cl_gui_alv_grid.
define this as a subclass so we can access the protected attributes
of the superclass cl_gui_alv_grid
public section.
methods: constructor, disp_tab.
endclass.
need this now to instantiate object
as we are using subclass rather than the main cl_gui_alv_grid.
class zcltest implementation.
METHOD constructor.
CALL METHOD super->constructor
exporting i_appl_events = 'X'
i_parent = grid_container1.
endmethod.
method disp_tab.
FIELD-SYMBOLS: <outtab> TYPE STANDARD TABLE.
break-point 1.
mt_outtab is the data table held as a protected attribute
in class cl_gui_alv_grid.
ASSIGN me->mt_outtab->* TO <outtab>. "Original data
do whatever you want with <outtab>
contains data BEFORE changes each time.
Note that NEW (Changed) table has been obtained already by
call to form check_data USING P_ER_DATA_CHANGED
TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
Entered data is in table defined by <fs2>
In this method you can compare original and changed data.
Easier than messing around with individual cells.
do what you want with data in <fs2> validate / update / merge etc
endmethod.
endclass.
data :
ok_code like sy-ucomm,
save_ok like sy-ucomm,
i4 type int4,
Container Object [grid_container]
now created via method constructor
in the subclass zcltest.
Control Object [grid]
grid1 type ref to zcltest,
Event-Handler Object [grid_handler]
grid_handler type ref to lcl_grid_event_receiver.
start-of-selection.
call screen 100.
module status_0100 output.
now display it as grid
if grid_container1 is initial.
create object grid_container1
exporting
container_name = 'CCONTAINER1'.
create object grid1.
break-point 1.
create object grid_handler.
set handler:
grid_handler->user_command for grid1,
grid_handler->toolbar for grid1,
grid_handler->handle_data_changed for grid1.
perform create_dynamic_fcat.
perform create_dynamic_itab.
perform populate_dynamic_itab.
perform init_grid.
perform register_enter_event.
set off ready for input initially
i4 = 0.
call method grid1->set_ready_for_input
exporting
i_ready_for_input = i4.
endif.
endmodule.
module user_command_0100 input.
*PAI not needed in OO ALV anymore as User Commands are handled as events
*in method user_command.
*we can also get control if the Data entered and the ENTER is pressed by
*raising an event.
Control then returns to method handle_data_changed.
endmodule.
form create_dynamic_fcat.
get structure of our user table for building field catalog
Use the RTTI functionality
lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( wa_data ).
Build field catalog just use basic data here
colour specific columns as well
loop at lr_rtti_struc->components into zog.
c_index = c_index + 1.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = zog-name .
wa_it_fldcat-datatype = zog-type_kind.
wa_it_fldcat-inttype = zog-type_kind.
wa_it_fldcat-intlen = zog-length.
wa_it_fldcat-decimals = zog-decimals.
wa_it_fldcat-lowercase = 'X'.
if c_index eq 2.
wa_it_fldcat-emphasize = 'C411'.
endif.
if c_index eq 3.
wa_it_fldcat-emphasize = 'C511'.
endif.
append wa_it_fldcat to it_fldcat .
endloop.
endform.
form create_dynamic_itab.
Create dynamic internal table and assign to field sysmbol.
Use dynamic field catalog just built.
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
endform.
form populate_dynamic_itab.
load up a line of the dynamic table
c_dec2 = c_dec2 + 11.
wa_element-anyfield1 = 'Tabbies'.
wa_element-anyfield2 = 'ger.shepards'.
wa_element-anyfield3 = 'White mice'.
wa_element-anyfield4 = 'Any old text'.
wa_element-anyfield5 = c_dec2.
append wa_element to <dyn_table>.
endform.
form check_data USING P_ER_DATA_CHANGED
TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
Get altered data back
ASSIGN p_er_data_changed->mp_mod_rows TO <FS1>.
stab = p_er_data_changed->mp_mod_rows.
ASSIGN STAB->* TO <FS2>.
LOOP AT <FS2> INTO sdog.
ALV grid display with altered data is now in <fs2>.
do any extra processing you want here
endloop.
now display new table
call method grid1->disp_tab.
endform.
form exit_program.
call method grid_container1->free.
call method cl_gui_cfw=>flush.
leave program.
endform.
form refresh_disp.
call method grid1->refresh_table_display.
endform.
form update_table.
The dynamic table here is the changed table read from the grid
after user has changed it
Data can be saved to DB or whatever.
loop at <dyn_table> into wa_element.
do what you want with the data here
endloop.
switch off edit mode again for next function
i4 = 0.
call method grid1->set_ready_for_input
exporting
i_ready_for_input = i4.
endform.
form set_input.
i4 = 1.
call method grid1->set_ready_for_input
exporting
i_ready_for_input = i4.
endform.
form switch_input.
if i4 = 1.
i4 = 0.
else.
i4 = 1.
endif.
call method grid1->set_ready_for_input
exporting
i_ready_for_input = i4.
endform.
form init_grid.
Enabling the grid to edit mode,
struct_grid_lset-edit = 'X'. "To enable editing in ALV
struct_grid_lset-grid_title = 'Jimbos Test'.
call method grid1->set_table_for_first_display
exporting
is_layout = struct_grid_lset
changing
it_outtab = <dyn_table>
it_fieldcatalog = it_fldcat.
endform.
form register_enter_event.
call method grid1->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
Instantiate the event or it won't work.
create object g_event_receiver.
set handler g_event_receiver->handle_data_changed for grid1.
endform.</b>Hi there
IE7 doesn't give me the add new page option and I get 404 error when trying to access the "How to contribute" section.
I'll load up Firefox later (this browser usually works when IE7 doesn't always work properly).
I'll copy the stuff to the wiki when I've got the browser sorted out.
Cheers
jimbp -
How to join two tables and get the supply delivery date next to order?
So there are two tables. One has customer's order no, ordered date, order quantity, available quantity and code of article-
The other table comes form supply side where we have supply order no, article number, ordered qty, and delivery date.
We keep stock so this can not be MOT (made to order) system.
What i need is correct date of arrival to appear next to cusotmers spoecirfic order. The older cusotmers order get's the parts first, second oldest order is next in line etc.
here is any example
customer's order
ref order
art. code
ordered qty
available qty
order date
1809202491
700497
60
0
3.7.2014
1809200528
700497
13
0
20.6.2014
1809198640
700497
7
0
9.6.2014
supply order
supply order
art. code
qty orderd
date of arrival
4501243378
700497
50
4.8.2014
4501263437
700497
20
6.10.2014
There is actually a 3rd "table" and that sort of connects the two and that is stock on hand per art. code.
The main issue is that stock is assigned to purchase orders only when it actually arrives in the warehouse.
A human can easilly connect the dates of when the stock will arrive and quantities with correct customer's order. In this case the firts order will get 50 pcs in August while 10 pcs will remain on backorders. The missing 10 pcs Will arrive in October. The second order will get 10 pcs in october and 3 will remain on backorders with no delivery date. While the third customer orders does not have a delivery date.
So how to make the SAP do this calculations and display the arrival date next to date of customer's order?I checked the instructions as i do not have access to this part. It seem this is a query. We had issues with queries in the past as not all codes from orders would appear in them. They never found the reason why that is happening.
However, I think the main issue is that the information here is not connected and is separately provided for supply and for sales. So i doubt it can be connected in this query.
edit: as you can see the only connection is stock on hand.
and total number of various items we have is close to 100.000 of various article codes. -
Good day,
I searched through the forum and cant find anything.
I have around 300 published reports on SSRS and we are busy migrating to a new system.
They have already setup their tables on the new system and I need to provide them with a list of table names and column names that are being used currently to generate the 300 reports on SSRS.
We use various tables and databases to generate these reports, and will take me forever to go through each query to get this info.
Is it at all possible to write a query in SQL 2008 that will give me all the table names and columns being used?
Your assistance is greatly appreciated.
I thank you.
Andre.There's no straightforward method for that I guess. There are couple of things you can use to get these details
1. query the ReportServer.dbo.Catalog table
for getting details
you may use script below for that
http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c
2. Another method is to run the reports and run sql profiler trace on background to retrieve queries used.
But in some of these cases the report might be using a procedure and you will get only procedure. Then its upto you to get the other details from procedure like tables used, columns etc
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to display sub table and NOT repeat each detail line?
I am going nuts trying to get this thing to display correctly, so I am someone can help me. I am trying to display a sub table (not subreport - tried that and it doesn't work) for detail records. For Example on an invoice items may have child items.
I am using Crystal 11
I have two tables iDetail and iSubDetail
My detail section looks like this:
D iDetail.itemNum iDetail.price
iSubDetail.itemNum
I have a Left Outer link from iDetail.itemNum --> iSubDetail.itemNum
I should see something like this:
itemOne $50.00
subItemOne
subItemTwo
subItemThree
subItemFour
itemTwo $25.00
itemThree $30.00
etc...
Instead, my Crystal report displays this:
itemOne $50.00
subItemOne
itemOne $50.00
subItemTwo
itemOne $50.00
subItemThree
itemOne $50.00
subItemFour
itemTwo $25.00
itemThree $30.00
etc...
and of course the total for the invoice is wrong.
I have tried all the different links and a subreport, but I cannot get it to display correctly. Does anyone have any ideas??I tried subreport but I can't figure out how to turn it OFF for non-relative items; from the above example data I would get with a subreport:
itemOne $50.00
subItemOne
subItemTwo
subItemThree
subItemFour
itemTwo $25.00
subItemOne
subItemTwo
subItemThree
subItemFour
itemThree $30.00
subItemOne
subItemTwo
subItemThree
subItemFour
Looks great for itemOne, but I can't turn it off for itemTwo and itemThree. I have tried hiding the subreport if iDetail.itemNum =
iSubDetail.itemNumi, but if SubDetail table is accessed it repeats the iDetail record like the original post.
I tried hiding it in the subreport, but it does not know what the main report record is. I couldn't find anyway to PASS the itemNum from the main report to the subreport. If I could pass it as a variable, I could just hide the subreport when it is NE to iSubDetail.itemNum.
I kind of got it working by grouping the iDetail record by itemNum. However, the problem with that is when there really is multiple iDetail records, the invoice only shows one!! So, I would still like to find a better solution,
Thanks for your reply. -
Is there a way to reference just a sheet (not table and cell)
I want to have a profile overview sheet tat will draw from individual profile sheets. Is there a way to set up a cell with which table and cell to draw from, but then make it draw the sheet name from a different cell. That way I can fill in the sheet name in the appropriate cell, and all the other cells would automatically draw from the appropriate sheet.
Any tips or advise would be appreciated.=IFERROR(INDIRECT(A1 & " :: Table 1 :: A2"),"")
or
=IF(A1="","",INDIRECT(A1 & " :: Table 1 :: A2"))
The first will capture errors caused by A1 being blank and errors caused by A1 specifying a non-existent sheet (i.e., typos). The second one prevents errors caused by A1 being blank but will still give an error if you specify a non-existent sheet.. -
Exception raised while trying to join Table and Stream
I have written a sample Project to fetch the data from a Table and join it with the Input Stream. Followed the same procedure specified at http://download.oracle.com/docs/cd/E17904_01/doc.1111/e14301/processorcql.htm#CIHCCADG
I am getting the exception:
<Error> <Deployment> <BEA-2045016> <The application context "Plugin" could not be started. Could not initialize component "<unknown>":
Invalid statement: "select PROMOTIONAL_ORDER.ORDER_ID as orderId ,PROMOTIONAL_ORDER.UFD_ID as ufdId, PROMOTIONAL_ORDER.WEB_USER_ID as webUserId
from helloworldInputChannel [now] as dataStream, PROMOTIONAL_ORDER where >>PROMOTIONAL_ORDER.ORDER_ID = dataStream.ORDER_ID<<"
Cause: wrong number or types of arguments in call to et
Action: Check the spelling of the registered function. Also confirm that its call is correct and its parameters are of correct datatypes.>
If the where condition is removed then the application runs fine fetching the data from the Tables.
Following is the config.xml for processor:
======================================
<?xml version="1.0" encoding="UTF-8"?>
<n1:config xmlns:n1="http://www.bea.com/ns/wlevs/config/application">
<processor>
<name>helloworldProcessor</name>
<rules>
<query id="dummyRule"> <![CDATA[
select PROMOTIONAL_ORDER.ORDER_ID as orderId ,PROMOTIONAL_ORDER.UFD_ID as ufdId, PROMOTIONAL_ORDER.WEB_USER_ID as webUserId
from helloworldInputChannel [now] as dataStream, PROMOTIONAL_ORDER where PROMOTIONAL_ORDER.ORDER_ID = dataStream.ORDER_ID
]]></query>
</rules>
</processor>
</n1:config>
Following is the assembly file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:wlevs="http://www.bea.com/ns/wlevs/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.bea.com/ns/wlevs/spring
http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd">
<wlevs:event-type-repository>
<wlevs:event-type type-name="CorpInterfaceEvent">
<wlevs:class>com.bea.wlevs.event.example.helloworld.CorpInterfaceEvent</wlevs:class>
</wlevs:event-type>
<wlevs:event-type type-name="PromotionalOrderEvent">
<wlevs:properties>
<wlevs:property name="ORDER_ID" type="bigint" />
<wlevs:property name="UFD_ID" type="bigint"/>
<wlevs:property name="WEB_USER_ID" type="bigint" />
</wlevs:properties>
</wlevs:event-type>
<wlevs:event-type type-name="DummyEvent">
<wlevs:properties>
<wlevs:property name="ORDER_ID" type="bigint" />
<wlevs:property name="UFD_ID" type="bigint"/>
<wlevs:property name="WEB_USER_ID" type="bigint" />
</wlevs:properties>
</wlevs:event-type>
</wlevs:event-type-repository>
<!--
Adapter can be created from a local class, without having to go
through a adapter factory
-->
<wlevs:adapter id="helloworldAdapter"
class="com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter">
<wlevs:instance-property name="message"
value="HelloWorld - the current time is:" />
</wlevs:adapter>
<wlevs:channel id="helloworldInputChannel" event-type="CorpInterfaceEvent">
<wlevs:listener ref="helloworldProcessor" />
<wlevs:source ref="helloworldAdapter" />
</wlevs:channel>
<!-- The default processor for OCEP 11.0.0.0 is CQL -->
<wlevs:processor id="helloworldProcessor">
<wlevs:table-source ref="PROMOTIONAL_ORDER" />
</wlevs:processor>
<wlevs:channel id="helloworldOutputChannel" event-type="CorpInterfaceEvent"
advertise="true">
<wlevs:listener>
<bean class="com.bea.wlevs.example.helloworld.HelloWorldBean" />
</wlevs:listener>
<wlevs:source ref="helloworldProcessor" />
</wlevs:channel>
<wlevs:table id="PROMOTIONAL_ORDER" event-type="PromotionalOrderEvent"
data-source="wlevsDatasource" />
</beans>
CorpInterfaceEvent.java:
package com.bea.wlevs.event.example.helloworld;
public class CorpInterfaceEvent {
private Long orderId;
public Long ORDER_ID;
private Long ufdId;
private Long webUserId;
public CorpInterfaceEvent(){
super();
public Long getOrderId() {
return orderId;
public void setOrderId(Long orderId) {
this.orderId = orderId;
public Long getORDER_ID() {
return ORDER_ID;
public void setORDER_ID(Long oRDERID) {
ORDER_ID = oRDERID;
public Long getUfdId() {
return ufdId;
public void setUfdId(Long ufdId) {
this.ufdId = ufdId;
public Long getWebUserId() {
return webUserId;
public void setWebUserId(Long webUserId) {
this.webUserId = webUserId;
Adapter:
/* (c) 2006-2009 Oracle. All rights reserved. */
package com.bea.wlevs.adapter.example.helloworld;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.Date;
import com.bea.wlevs.ede.api.RunnableBean;
import com.bea.wlevs.ede.api.StreamSender;
import com.bea.wlevs.ede.api.StreamSource;
import com.bea.wlevs.event.example.helloworld.CorpInterfaceEvent;
public class HelloWorldAdapter implements RunnableBean, StreamSource {
private static final int SLEEP_MILLIS = 300;
private DateFormat dateFormat;
private String message;
private boolean suspended;
private StreamSender eventSender;
public HelloWorldAdapter() {
super();
dateFormat = DateFormat.getTimeInstance();
/* (non-Javadoc)
* @see java.lang.Runnable#run()
public void run() {
suspended = false;
while (!isSuspended()) { // Generate messages forever...
generateHelloMessage();
suspend();// This would generate the messages only once..
try {
synchronized (this) {
wait(SLEEP_MILLIS);
} catch (InterruptedException e) {
e.printStackTrace();
public void setMessage(String message) {
this.message = message;
private void generateHelloMessage() {
String message = this.message + dateFormat.format(new Date());
CorpInterfaceEvent event = new CorpInterfaceEvent();
//event.setOrderId(1);
event.setORDER_ID(Long.valueOf(1));
eventSender.sendInsertEvent(event);
/* (non-Javadoc)
* @see com.bea.wlevs.ede.api.StreamSource#setEventSender(com.bea.wlevs.ede.api.StreamSender)
public void setEventSender(StreamSender sender) {
eventSender = sender;
/* (non-Javadoc)
* @see com.bea.wlevs.ede.api.SuspendableBean#suspend()
public synchronized void suspend() {
suspended = true;
private synchronized boolean isSuspended() {
return suspended;
Kindly let me know if you need further info.Issue identified. The datatypes of the stream order id and the one from the tables differ.
The Long could not be casted to the bigint format of CQL.
On changing the datatype of ORDER_ID in the CorpInterfaceEvent to int, the join is successful.
Maybe you are looking for
-
IC Webclient Enhancement - Account Identification
Hi Experts, I have a requirement to include a new view in the Account Identification screen, and it is not working. I have explained the requirement and my steps below. Sorry that it is lengthy, I thought of providing all the details. I have the foll
-
3G not working in app but push notifications are working
Hi All, I have an unlocked iPhone 4 with 6.1.3 on the Vodafone network in the UK and seem to be having issues with my 3G connection. I was recently in the US and was using a Straight Talk sim there and no data problems there. Upon arrival my 3G now
-
Hi, I want to create a pie chart with data labels expressed in percent and a legend with actual numbers. It seems to me impossible to format the legend numbers in a way that they have a thousands separator if I choose to show the data labels in perce
-
I am new to mac, anything I do know is self taught. I have a macbook and imac both are OS 10.4.8. How can I share photo's between my mac, and my windows based pc?
-
Nikon D200 vs Nikon D100 crashes iPhoto
Does anyone have any idea why iPhoto would crash when saving Photoshop edited photos downloaded from my brand new Nikon D200. It doesn't happen with any of the photos in iPhoto that were downloaded with my Nikon D100. I made sure all available Apple