Query with Relations
Hi,
Can BEA weblogic 7.0 ejbc support Query with relations ?
I have two CMP entity beans: Party and User. Party and User have 1:1 relation.
In User Bean, I try to write following query using relation to party
SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and r.party.uUID=
?3
yet, I got following:
weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
While trying to process Query
SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and r.party.uUID=
?3
Could not parse EJB QL expression.
The problem is at "r.party.uUID = ?3". If I removed the this part, then it ejbc
is happy.
So my question is : is Weblogic 7 support query with relations ?
or I have to write my own SQL query ?
Thanks
Chester
OK, I answered my own question. Weblogic 7 does support query relations.
notice that "r.party.uUID= ?3" there is no space between "uUID" and "=".
ejbc apparently needs space. I added the space. ejbc is happy.
I don't recall EJB QL is space sensitive. This should be a bug.
Chester
"Chester" <[email protected]> wrote:
>
Hi,
Can BEA weblogic 7.0 ejbc support Query with relations ?
I have two CMP entity beans: Party and User. Party and User have 1:1
relation.
In User Bean, I try to write following query using relation to party
SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and
r.party.uUID=
?3
yet, I got following:
weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
While trying to process Query
SELECT OBJECT(r) FROM User r WHERE r.login = ?1 and r.password = ?2 and
r.party.uUID=
?3
Could not parse EJB QL expression.
The problem is at "r.party.uUID = ?3". If I removed the this part, then
it ejbc
is happy.
So my question is : is Weblogic 7 support query with relations ?
or I have to write my own SQL query ?
Thanks
Chester
Similar Messages
-
I have a client who is fairly au fait with Dreamweaver but has run into some difficulties so they have asked me to take over.
The problem files' (downloaded from the net into Dreamweaver using the 'get' function), relative paths were 'out' by an extra hierarchical level and hence didn't display or work correctly locally on my laptop. I haven't yet looked into why this was the case but was able to fix it without too much hassle by using the find and replace feature.
However I am confused as to why these html pages display correctly online as their paths have an extra ../ in them.
One of the pages that has the extra level is this http://www.wildlifeartgallery.com/exhibitions/harry_becker2/harry_becker2_page1.html
The hierachy of the files in the website is as below with the scripts and styles folders on the same level as the index.html page. The problematic pages are located 'exhibitions/harry_becker2/harry_becker2_page1.html' to page7 (page 10 is me testing).
Surely the relative links to the styles folder should be ../../ as they are with all the other artists' exhibition pages rather than ../../../ ??
I would be most grateful if someone could take a look for me and give me an expIanation as to how the CSS and scripts display and work without issue when they seem to be linked incorrectly or is it me going mad!!
Thanking you in anticipation.
Lisa
FYI I use Dreamweaver CS5.5 on OSx 10.6 and my clients use Dreamweaver CS6 on Mountain Lion.First thing I will tell you at the outset is that before you downloaded the site from the remote server, you should have defined a site on your laptop by creating the necessary folders for the site name, css, scripts, images, downloads, etc etc. this would have put you in a better position and you would have avoided doing find & replace work.
Now coming to your main question, the links in a website are either document relative or site relative. The difference is that with site relative, you need to provide the full http:// address but with document relative, DW will put the links like this:
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
As your site is now working, you will be better off keeping it as it is otherwise, you can read the first part of David's tutorial that teaches how to setup the basic site. It doesn't go into creating folders for images, css, scripts etc but you get the idea after you have worked on his tutorial.
<http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1_cs6.html>
Good luck. -
A query with respect to creation of the shared Objects.
Hi ,
I am having a query with respect to creation of the shared Objects.
I have seen a example where the Author is creatining Shared Object as shown
below :
SharedObj = null;
sharedObj = SharedObject.getLocal("myTasks");
and there is nothing related to the word "myTasks" anywhere in the Application .
Can anybody please let me know what is this word "myTasks" mean here ??
Thanks in advance .hi,
With a shared object it will create one if it doesn't exist, so "myTasks" will become the shared object name or if it exists it will load any objects that are within that shared object.
Below is a simple example that uses sharedobjects to store login details.
http://gumbo.flashhub.net/login/
David -
Help Required: Working with relational data
Hi,
I'm looking for some advice
Scenario
We have a customer who has an SE relational database with Apex for transaction processing. They require reporting functionality and are debating whether to buy BI SE One or BI EE; they will not buy the enteprise edition database though.
Questions
Here are my questions:
1. In order to use answers and dashboards, does the relational data have to be in a dimensional format. Is this reccommended.
2. We were debating on whether to create data marts for various business requirements. Is this standard procedure for relational data (Which is not too complex)
3. If the data has to be in a dimensional format, is this best modelled using warehouse builder or the model layer of the repository using BI Administrator. (Baring in mind that the customer is an SME using a SE database)
The main problem where having, been fairly new to warehouse building, is that we dont know what the best path is to take when working with relational data. Do we create dimensional models? What should we use? Is a relational structure suitable enough?
Can anyone shed light on our problems
Regards
Kevin1. In order to use Answers and Dashboards you do not need to have a Data Warehouse. It can report out of both Transactional database as well as a data warehouse.
2. It depends on what your business requirements are. BI EE/SE1 does not require you to have data marts. Data Marts would give performance gains, would help you in visualizing the transactional data from a business standpoint, is a big plus but not a mandate. If you want to go that route of creating Datamarts, you can easily do that using BI SE1 since that gives you warehouse builder which can be both used as a data modelling tool and a ETL tool.
3. Warehouse Builder is a ETL tool. It helps in you visualizing/deploying data warehouses in databases. But BI EE Admin tool is more of a logical dimension modelling tool wherein the facts and dimensions do not exist physically but the tool uses them to do the querying/processing.
Since you are just starting, what you can do is to use BI EE directly on top of the transactional system for the time being. But as a long term solution you can start working on your data marts and as soon as they are ready you can port the BI EE on top of them rather than the transactional system.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
Doubt in Firing Query with multiple opportunities UUID/IDs
HI Folks!
I might have simple doubt but please help me on this!
1. I have a custom BO with association to opportunities.
[DeploymentUnit(CustomerRelationshipManagement)] businessobject Sy_Trade {
[AlternativeKey] [Label("Trade Id")] element tradeid : BusinessTransactionDocumentID;
node RelatedOpportunities [0,n]{
element BusinessTransactionDocumentReference : BusinessTransactionDocumentReference;
element BusinessTransactionDocumentRelationshipRoleCode : BusinessTransactionDocumentRelationshipRoleCode;
association RelatedOpportunity[0,1] to Opportunity;
2. I have success fully used association and i am able to view create all the opportunities related to my custom Bo.
ISSUE : I want a facet where i just want DISPLAY the activities and sales document assigned in the RELATED OPPORTUNITIES ( N opportunities )
How do i query with Multiple opportunities ID and fetch the activities against it?
Btw I want to use query in UI Designer... I have created an advanced list pane and there i want the result list
I hope i am clear!
Thanks in adavance...
Regards
DhruvinHi Ludger,
I have successfully displayed Related Opportunities associated with trade.( i am able to create , delete also )
Issue : I am not able to "Display" ( i don't need to edit or create ) all the activities created against all the opportunities in a different tab.
I tried to approaches :
1: Query : Created a Query on Activity BO and tried to pass multiple related opportunities ( but seems not possible , please tell me any possibility to pass range of opportunity via transformation or anything? )
2 : binding : I have a Node Related Opportunity so just tried to bind it with BO model but problem is it is displaying all the activities of first opportunity of the list...
i think why because :
In Data model I have created a table bind with Related Opportunities...
now that node is 1 to N , association to opportunity 0 to 1 , hence i think it fetches only 1 opportunities activity
should i create like below ( Or is it possible)
Node Reltdoppts[0,1]
association [0,N] to opportunity BO ?
Although i strongly feel SAP should provied us two things :
1. We need to pass range of opportunities in a query.
2. We need to just write some absl code where i can fill the table and display it
and also is there any possibility to create a report or something to display activities as we just want to display the activities!
P.S : I have been getting a lot of bashing from client because some of the product restriction in cloud! i hope and wish SAP give developers free hand to develop right now its like our hands are tied to many things -
I am building a module in which the user gives a particular date (date_param) and the module then queries in a particular block for all records where the date column equals
to_char(date_param, 'WW'). I tried doing it with a pre_query trigger on the block with this code:
to_char(:block_name.date_column, 'WW') := to_char(date_param, 'WW')
Needless to say, this doesn't work. How else can I do it?
Thanks in advance,
Paul.Hi Paul
With the requirement of your you cannot assign a pre-query option like what you are mentioning, for in Pre-query you have to assign the values which are matching the datatype of base table item i.e in this case the date field of the base table block.
So the solution is, instead of specifying your to_char function in pre-query, (do not write anything in pre-query trigger related to this problem), use the Built-in set_block_property("base_table_block_name",DEFAULT_WHERE, 'to_char(date_param, ''WW'') = to_char('''| |:block_name.date_column| |''', ''WW'') ');
and then query the block.
Hope this works for you.
Regards
Mohammed R.Qurashi
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paul Green ([email protected]):
I am building a module in which the user gives a particular date (date_param) and the module then queries in a particular block for all records where the date column equals
to_char(date_param, 'WW'). I tried doing it with a pre_query trigger on the block with this code:
to_char(:block_name.date_column, 'WW') := to_char(date_param, 'WW')
Needless to say, this doesn't work. How else can I do it?
Thanks in advance,
Paul.<HR></BLOCKQUOTE>
null -
Dear Experts,
I have writen a inner join code with MKPF and MSEG which taking too much time, while I have used index.
Indexes are:
MSEG
MATNR
WERKS
LGORT
BWART
SOBKZ
MKPF
BUDAT
MBLNR
My Select Query is :
SELECT B~MATNR
B~MAT_KDAUF
B~MAT_KDPOS
B~BWART
B~MENGE
B~MEINS
B~AUFNR
INTO TABLE IT_MSEG
FROM MKPF AS A
INNER JOIN MSEG AS B
ON AMBLNR EQ BMBLNR
AND AMJAHR EQ BMJAHR
WHERE A~BUDAT IN BUDAT
AND B~MATNR IN MATNR
AND B~WERKS IN WERKS
AND B~LGORT IN LGORT
AND B~BWART IN BWART.hi,
you can use for all entries it will work faster then joins
About it:*
FOR ALL ENTRIES WHERE
Syntax
... FOR ALL ENTRIES IN itab WHERE ... col operator itab-comp ...
Effect
If the addition FOR ALL ENTRIES is specified before the language element WHERE, then the components comp of the internal table itab can be used as operands when comparing with relational operators.
The internal table itab must have a structured line type and the component comp must be compatible with the column col.
The logical expression sql_cond of the WHERE condition can comprise various logical expressions by using AND and OR. However, if FOR ALL ENTRIES is specified, there must be at least one Comparison with a column of the internal table itab, which can be specified either statistically or dynamically (Release 6.40 and higher). In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY.
The whole logical expression sql_cond is evaluated for each individual line of the internal table itab. The resulting set of the SELECT statement is the union of the resulting sets from the individual evaluations. Duplicate lines are automatically removed from the resulting set. If the internal table itab is empty, the whole WHERE statement is ignored and all lines in the database are put in the resulting set.
Notes
In Release 6.10 and higher, the same internal table can be specified after FOR ALL ENTRIES and after INTO.
The addition FOR ALL ENTRIES is only possible before WHERE conditions of the SELECT statement.
Example
Exporting all flight data for a specified departure city. The relevant airlines and flight numbers are first put in an internal table entry_tab, which is evaluated in the WHERE condition of the subsquent SELECT statement.
PARAMETERS p_city TYPE spfli-cityfrom.
TYPES: BEGIN OF entry_tab_type,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF entry_tab_type.
DATA: entry_tab TYPE TABLE OF entry_tab_type,
sflight_tab TYPE SORTED TABLE OF sflight
WITH UNIQUE KEY carrid connid fldate.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE entry_tab
WHERE cityfrom = p_city.
SELECT carrid connid fldate
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE sflight_tab
FOR ALL ENTRIES IN entry_tab
WHERE carrid = entry_tab-carrid AND
connid = entry_tab-connid.
hope it will help you
Rahul sharma
Edited by: RAHUL SHARMA on Sep 11, 2008 8:10 AM -
Hierarchical query with where clause
Hi,
How can I query hierarchically a query with WHERE clause? I have a table with three fields session_id,id and root_id.
When I try with the following query,
select id, level from relation
where session_id = 79977
connect by prior id = root_id start with id = 5042;
It gets duplicate values.
I want the query to show in the hierarchical manner with a filter condition using WHERE clause. Please help me how can I achieve this. If you know any link that describes more about this, please send it.
Thanks in Advance.
Regards,
-ParmyHi Sridhar Murthy an others,
Thanks a lot for your/the answer. It's working for me. It saved a lot of other work around without the proper knowledge of hierarchical query. Please send me any link that describes these issues in detail and also I hope as I have mentioned in the other message, same cannot be achieved on views or ( on two different tables ???)
Any way thanks for your reply,
It's working for me.
With happiness,
-Parmy -
Query with Cost Center Hierarchy giving incorrect results
Hi All,
I have a universe built based on BEx query on Cost Center cubes. When enabling hierarchy in BEx Query and building Web intelligence Report based on the universe, I get incorrect results. The levels of the hierarchy is incorrect, many of the cost centers are missing etc. I checked the universe and confirmed that all levels of hierarchy are generated correctly. The Lov generated for these levels are correct and I see the complete hierarchy when using the BEx Variable in Universe for filtering.
I tried the same query with Hierarchy disabled with a different universe and it is providing correct results. Not sure what I'm missing here. Any inputs regarding this is appreciated.
Thanks & Regards,
SreeIngo, Thanks for your suggestion. Of course, I did update the Universe after any changes in the query. Tried different query setting related to hierarchy to make it work, but didn't many any difference and I get consistently incorrect results.
One thing what I wanted to confirm is, if there is any known bug in SP 2 Fix Pack 2.7 related to hierarchies. If not, it might be me doing some thing wrong and I will look into in more detail.
Thanks & Regards,
Sree -
Size of schma with relation to tablespaces
How to identify the size of schema in a database. I want to know the size of 5 schema alone in a database and there are some more schema also in the db.
PS: It would be great if query can relate the size of schema to the schema name and not the owner and segment alone.Please clarify, If owner = Schema,
I have the login credentials (TNS entry details) to login into a particular schema.
When I log in SQL PLUS I am able to connect to the schema and view the schema objects however,
when I query the DBA_Segments in sys user with owner = "the corresponding schema name" I don't get any records.
Can I not get all the schema size by logging into sys user as sysdba and issue the below query ???
SELECT s.owner,SUM (s.BYTES) / (1024 * 1024) SIZE_IN_MB
FROM dba_segments s
GROUP BY s.owner
The above query doesn't return the size of schema for all users i am able to login in sql plus. Can you please clarify? -
Join SAP BW Query with SAP BW Table
Hello guys,
we would´need to join a SAP BW Query with information of an SAP BW Table like it is explained in the following example:
The result of the query is:
ID Quantity Revenue
4711 10 20
4713 20 40
4714 30 30
The table will look like this:
ID Category
4711 A
4712 B
4713 C
4714 A
The result should be:
ID Category Quantity Revenue
4711 A 10 20
4713 C 20 40
4714 A 30 30
We would like to use the current SAP Business Objects 4.0 or 3.1 environment.
Is it possible to join these data sources in the universe Designer or in Crystal reports?
Regards,
MarkusHello Markus,
the Information Design Tool is able to create a relational Universe on top of InfoProvider which will show the tables from the cube, but the Information Design Tool in the current release is not able to show the tables from the ERP system.
regards
Ingo Hilgefort -
Query with Tables from another Database
Hi.
I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
"....FROM [-BDName-].[dbo].[-TableName-] T1..... "
Any suggestions? Thanks a lot....
(Suggestions in English or Spanish)None
-
Query with SOST/ SOSB Transaction re. Sender is Releaser not Creater of PO
Hi
We have a query with SOST/ SOSB transaction.
It relates to Purchase orders and Release strategy
The name appearing on SOST / SOSB is the person who has 'released the Purchase order' and not the 'actual creater of the purchase order'
This is causing a problem as users who have created orders, cannot trace their own Purchase orders via SOSB transaction to see whether they have been sent correctly or any errors have occurred
Is there any way to resolve this problem ???
Many thanks
TonyHi Jurgen
We have implemented this note
It works for Released FAXES, but for released EMAILED ORDERS, it is still showing the sender as the person who has released the order
Have you come across the same thing ???
Cheers
Tony -
I have a query with two variables (Employee and Date). The query is working fine if both of the variables are check and values assigned. But if only one variable is checked and a value assigned then the query will return 0 results. Is it possible that the query cannot work with only one variable out of the 2? Do I need a workaround or am i doing something wrong?
Here is the query:
SELECT T0.DocNum, T0.DocDate, T0.DocDueDate, T0.CardCode, T0.CardName, T0.Address, T0.DocTotal, T0.U_Employee, T1.firstName,T1.lastName, T0.Comments FROM OVPM T0 LEFT JOIN OHEM T1 ON T0.U_EMPLOYEE = T1.FIRSTNAME' 'T1.LASTNAME WHERE T0.DocType = 'A' AND T0.U_EMPLOYEE = [%0] AND T0.DocDate =[%1].
Thank you so much for your help,
Irina StancaAFAIK, at least with 'complex queries' unchecked parameter gets
some default/blank value. Therefore, you should allow default values in your
WHERE clause.
You want: WHERE T0.COL = @VAR
You write: WHERE (T0.COL = @VAR OR [logical test for @VAR is a default value])
Snippets like this may help you in finding out that default value:
-- snip --
/SELECT FROM [dbo].[OHEM] T9/
declare @VAR_EMPL as char(20)
/* WHERE */
set @VAR_EMPL = /* T9.lastName */ '[%0]'
/SELECT FROM [dbo].[OVPM] T8/
declare @VAR_DATE as char(20)
/* WHERE */
set @VAR_DATE = /* T8.DocDate */ '[%1]'
SELECT '@VAR_EMPL: ' + '|' + @VAR_EMPL + '|' + '@VAR_DATE: ' + @VAR_DATE + ' DATEDIFF: ' + cast(DATEDIFF(day, CAST('1900-01-01' as datetime), CAST(@VAR_DATE as datetime)) as varchar)
[/code]
-- snip --
Yes, it looks like the default value for dates is '1900-01-01'.
Therefore, you may want to code this way
.. WHERE (DocDate = @VAR_DATE OR DATEDIFF(day, CAST('1900-01-01' as datetime), CAST(@VAR_DATE as datetime)) > 0)
I also noticed a date-related issue that may cause problems in complex queries
if you work with dates from last century AND if your date format in B1 is YY instead of CCYY:
you enter 1907 and B1 interprets it as 2007.
HTH
Juha -
How to create an ABAP Query with OR logical expression in the select-where
Hi,
In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
Please help me on this.. Points will be rewarded.
Thanks a lot.
Regards,
Question ManHi Bhupal, Shanthi, and Saipriya,
Thanks for your replies. But that didn't answer my question.
Bhupal,
You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
Shanthi,
Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
Saipriya,
Like what I have said, this is a standard SAP code so we can't do your suggestion.
I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
Thanks a lot.
Points will be rewarded.
Regards,
Question Man
Maybe you are looking for
-
So I have to vent.(guess all we can do before our phones come.) I went to my local bestbuy on the 7th to "PRE ORDER" 2 sprint iphone 4s. A 16 for my brother for his birthday,and a 32 for myself. I pre ordered both phones within a minute apart. Litter
-
Here is a sample of my code: I initially have one (non-null & valid - checked that !) node (dataNode). I need to do a XSL transformation on this one using an xsl (non-null & valid String). I can do manually the transform using a program such as XMLSp
-
ITunes 10.5 will only run as Administrator, Windows 7
I have seen numerous threads on this but none of the proposed solutions work. I can get iTunes 10.5 to run, but only when using "Run as Administrator". I should not have to do that to run iTunes each and every time. I've done everything short of r
-
How can I see my external drive again after installing mavericks?
Hi, I just upgraded my Mac Book Air to Mavericks and I cannot see my external hard drives any more. The data is still there and can be read on other computers. Regular USB keys are also detected. What should be done so that the external hard drive be
-
Post Author: packer817 CA Forum: Authentication I'm looking for someone who has Business Objects, SQL Server, and DTS packages experience in the S.E. Pa. area who may be interested in a contract to permanent opportunity. If anyone knows of anyone, pl