XMLAgg using in group by in OWB 11 GR 2
HelloI want to use the sql xml operators to build the XML from relational data.
I use 11 GR 2 (11.2.0.1)
I followed this: http://blogs.oracle.com/warehousebuilder/entry/leveraging_xdb, but mapping wearing it is not included in the downloadable zip file.
My problem is the following:
I don't know how to use the group by part of the XMLAgg function in expression of OWB operator.
I will explain:
You have Tables DEPARTMENT and PERSON (examples of oracle data).
The XML must be:
< = 'SALES' service name >
PU_CLERK Baida < employee > < / employee >
Colmenares PU_CLERK < employee > < / employee >
< / Department >
Owb, you can join two tables and even use XMLAgg for combined, the employee fields.
Something like:
XMLAgg)
XMLElement ("EMPLOYEE", employee.lastname)
)
And that put in an xmlnode becomes:
XMLElement ("Department",
XMLAgg)
XMLElement ("EMPLOYEE", employee.lastname)
)
)
However if I want to use the departname of the person, who is just a field in the Recordset adheres and putting that in an attribute of the node Department Oracle complains.
XMLElement ("Department",
XMLAttributes (department.name like "name"),
XMLAgg)
XMLElement ("EMPLOYEE", employee.lastname)
)
)
This is because Oracle aggregates all records used for sourcing the constructed XML, not just things of the person.
Normally, you must include a Select Group by some of the training to allow the use of the Department name in the attribute such as:
Select
XMLElement ("Department",
XMLAttributes (department.name like "name"),
XMLAgg)
XMLElement ("EMPLOYEE", employee.lastname)
)
) of the employee to join the Department on (department.xx = employee.xx)
Department.name group
That is the catch! By using the group by in an expression of the faulty operator in sql results since OWB generates incorrect sql when you use generate intermediary and apparently in the wrong place!
Rather than appear after the xxx FROM it appears between the hook closing of xmlelement and FROM.
(Of course that this is due to owb just paste the contents of entire expression operators between the parties)
Someone knows how to fix this?
I need some kind of workaround without resorting to the pl/sql, etc.
As I said the blog display is not clear enough for me so if someone can help, please do :-)
This problem should not be first on the surface because it seems commonplace, it's just that I'm perplexed and owb guide is incomplete at best on this point.
I'm sorry for the loss of formatting, but the editor post on this forum is really...
Published by: MichaelR64 on June 30, 2011 14:21
Hi Michael
You must use the aggregator to make group as in the example below, you can set other expressions to project the XML, as I did below...
http://blogs.Oracle.com/warehousebuilder/resource/OWB/owb_xdb_example20110701.jpg
Is that what you're after?
See you soon
David
Tags: Business Intelligence
Similar Questions
-
If I go buy Apple Watch nike, that I can use other groups like leather band?
If I go buy Apple Watch nike, that I can use other groups like leather band?
At this point, all we know is here:
-
using the group name and password group in client anyconnect
Hello. Is it possible to use the group name/password of the legacy in customer cisco anyconnect vpn client? I checked the AnyConnect Administrator's Guide ' VPN XML Reference"and found nothing on this subject.
It's true.
AnyConnect Secure Mobility Client (VPN Module) can be used to connect to both types of VPN remote access:
1. full SSL VPN tunnel
2 IKEv2 VPN IPsec.
The legacy VPN client is used only with the old IKEv1 IPsec VPN and you cannot use this type of VPN client AnyConnect.
-
Setting up authentication by using ad group mappings
Hello
I recently installed ACS 5.3 and I try to configure as follows:
(1) devices are separated in places and device types.
(2) ACS performs authentication by using AD.
(3) the user must be in the specific ad group in order to access a device specific type/location.
I'm testing my setup with WCS. The server has been added to the list of network devices and placed in the appropriate place/device type.
Under the rules of access, I have set up a named (NAAS-WCS) Access Service that has an identity and mapping group structure.defined as follows:
* Identity: Condition (NDG:Device Type-> in all Types of devices: WC), results (identity store: AD1).
* Mapping group: (Condition: AD1:ExternalGroups), results (identity group: all groups: SBD-SEC-ENG).
What I'm trying to implement is the following rule:
If (device in device type WC) and (the user in the Group G-CRP-SEC-ENG) then allow access otherwise block.
I added the groups in the AD of the server configuration and used this group in the definition of the rules. The error I get from Ganymede when I try to open a session is attached in jpeg format.
Anyone know where I am going wrong? It's the first time I used the new ACS system.
Thank you
Sami Abunasser
I had a similar problem, since any request came as CHAP/MD5, which is not the same as MS-CHAP v1 and v2 that we chose the GBA.
How do you try to authenticate users? Web page or dot1x? If it's a web page, choose PAP as authentication and you should be fine.
-
How to use the Group condition in the ODI mappings
Hi Experts,
I have a requirement in the customization of BI applications. Can you please someone explain how to use the LISTAGG function in odi mapping.
I applied the LISTAGGR function at the level of mapping odi, but I get error below.
Mapping of ODI: ColumnName: ENAME Expression: LISTAGG (EMP. ENAME, ",") THE GROUP (RANKING BY EMP. ENAME)
Error:
ODI-1240: Flow LIST_AGG_FUN_USAGE fails during an operation of integration. This flow of charge table target EMP_BI.
ODI-1228: task failed LIST_AGG_FUN_USAGE (integration) on the scott_db of ORACLE target connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00937: not a function of simple-group
Oracle query:
If I used this sql query in the database the correct result is.
SELECT DEPTNO, LISTAGG (ENAME, ',') WITHIN THE EMP EMP (ENAME CONTROL) GROUP. DEPTNO;
Output:
10 CLARK, KING, MILLER 20 ADAMS, FORD, JONES, SCOTT, SMITH 30 ALLEN, JAMES, MARTIN, BLAKE, TURNER, WARD Please give your valid solutions, thanks in advance.
Kind regards
REDA
If you try in #ODI12C then in the set of properties, you can select the column which should be used to group by.
If it's 11g so its bit complicated. Simply replace the mapping with below codes.
LISTAGG (EMP. ENAME, ",") WITHIN GROUP (ORDER BY ENAME) / * sum() * /.
Magic!
Thank you
Chantal
-
Block traffic using security groups.
I want to block all traffic between two virtual machines, for which I created the security in Service named composer SG-WEB group.
In the DFW, I have two simple rules:
One rule that block traffic between the SG-WEB security group and another which helps everything. But I can still ping WEB1, WEB2 and vice versa. Of the ESXi if I look in the log of the FW I see traffic is allowed for the L2.
If instead of security groups, I use subnets, everything works fine. I know I have used security groups to identify the DFW traffic, but here does not at all, is this a bug or I'm missing some configuration required to achieve this?
Thank you.
What is the status of the VMware Tools in these virtual machines?
-
Photoshop crashes for almost 15 seconds, when using layer > Group layers or Layers Palette > layers command group. NOT on creating new group and creation of layers and n-drag-drop group manually in the Palette layers. Got a file of user interface design with close to 800 layers and lots of groups. This doesn't happen in smaller files. Using OS X Mavericks, Photoshop, CC 2014.2.2, mi 2014 15-inch Macbook Pro Retina.
I understand that the solution would be just to cut the file into smaller files and design each display of the user interface in a separate but file which would be painful. And it doesn't seem to be a very difficult task to just the layers in group.
OK, the first thing to try: disable the generator in the preferences of hiking (under Plug-Ins, at the top).
On my system, generator never took and a week to read information on all layers and is particularly slow on text layers.
-
I was curious how most was assigning applications. Would you recommend the creation of a group by the application or by using a group for several applications. The reason that I ask is that we have a group called "Basic Thinapp" which includes standard applications for all users, such as adobe reader, mozilla, flash, quicktime and some others so that all members of Thinapp Base gets our basic fixed package of applications.
The problem is that we want to install adobe reader locally on our virtual desktops because of the slow launch time and unable to show online them PDFs with IE. We use thinreg so when Adobe Reader icon is removed from the directory of our icon and when they the logoff and log back in, Adobe leaves behind a non-working icon that useless and users would have to remove it manually if they wanted to get rid of it. This does not seem the best approach.
I know that the best way to remove the app is to remove the users outside the group, ask them to logoff and log in again for the app to disappear. However, users would lose all basic applications. We could then put back them in the Group and forced to logoff and log back in again and they would get the base once again. That seems a lot to ask of users.
Creating a group by application seems to be more directors as well as all users will need to be placed in each groups.
Is there a better way to do this?
We mainly use the Application - approach of a group, but have a few groups with multiple applications.
With your case, I would do the following:
1. create a new group and put there also: all users in your group of basic thinapp
2 rebuild the thinapp adobe so that it uses this group
3. After all users have logged off at least once from step 2, replace your thinapp with the newly rebuilt thinapp
4. now, the Adobe Reader software works on his own group, you can delete users from this group, and after their next log off / log icon should disappear, because they are no longer allowed.
The only problem is that you need the thinapp riffle proberly file, so the thinapp must be in the file system until all users are connected at least once. And with the local profiles, connected only once on each computer with a profile of them.
Andreas
-
How do we use the SUBSTR function in OWB
Hello, I'm pretty new to OWB. I need to use the SUBSTR function in owb. My source table has 16 characters in length. But in my datamar,.
the length is 14 years. I want to the substring from source to the destination. The mappings are already developed. I need to change the mapping to make sure that,
It brings only SUBSTR (1.14) mini - DW.
Any help is appreciated.Use the operator of expression between two attributes.
OWB has already SUBSTR as a preset transformation
Take a look at the doc below
26.3.1 open the expression builderhttp://docs.Oracle.com/CD/E11882_01/OWB.112/e10935.PDF
-
I wrote the view below to request orders that have delivered quantity of subinventories of the selected warehouse. I need to calculate the total unique orders and sum for a given date and the total price.
I tried a lot chooses to SCO_REQSGROSS_V including
Select TRXN_DATE
count (*)
SUM (EXT_PRC)
of SCO_REQSGROSS_V
where trxn_date = to_date('30-AUG-2010')
Band TRXN_DATE, order_num
I need a count of all unique order numbers and ext_prc there for each date in a range of dates given. I keep coming back that the line account. Is there something wrong with my approach by using the GROUP BY clause. I have to use a partition clause and how would - it written?
create or replace view (SCO_REQSGROSS_V)
TRXN_DATE
order_num
EXT_PRC)
AS
Select TRUNC (transaction_date)
segment1
ext_price
Of
(
-lines
SELECT DISTINCT PRH.segment1
prl.line_num
ool.ordered_item item_number
mmt.trx_source_line_id
mmt.transaction_reference
ooh.order_number
prl.quantity
ROUND(ool.shipped_quantity * prl.unit_price,2) ext_price
mmt.transaction_date
mmt.subinventory_code
OF apps.po_requisition_headers_all prh
apps.po_requisition_lines_all prl
ooh apps.oe_order_headers_all
apps.oe_order_lines_all ool
apps.mtl_material_transactions mmt
WHERE prh.requisition_header_id = prl.requisition_header_id
AND ool.header_id = ooh.header_id
AND prh.requisition_header_id = prl.requisition_header_id
AND ooh.source_document_id = prh.requisition_header_id
AND ool.source_document_line_id = prl.requisition_line_id-(+)
AND ool.line_id = mmt.trx_source_line_id
AND mmt.transaction_type_id = 53 - Pick to order internal
AND prl.source_type_code = 'STOCK '.
AND prh.authorization_status = 'APPROVED '.
AND prl.item_id = ool.inventory_item_id
AND ool.shipped_quantity IS NOT NULL
AND ool.subinventory = mmt.subinventory_code
AND mmt.subinventory_code IN ('DEVICE', 'POWER', 'ELEVATOR', 'FURNITURE', 'MATERIAL', 'HEAT'
('MAINTENANCE', 'NICOLE 1', 'OFFICE', 'PAINT', "PAPER RM", "PLUMBING", "SKIL", "SURPLUS", "TOOL", "UNIFORM")
)Hello Comet,.
Please provide some examples of data, it would be useful to analyze your condition in a better way.
From what I understand (vaguely), for a given date, you wanted to know the number of orders also total of ext_prc for this order and unique.
Here is what I could come up with:select distinct trxn_date, count(order_num) over (partition by trunc(trxn_date)) cnt_orders, sum(ext_prc) over (partition by order_num) total_per_order -- for total_prc per order sum(ext_prc) over (partition by trunc(trxn_date)) total_per_txn_day -- for total_prc per day from SCO_REQSGROSS_V where trunc(trxn_date) = to_date('30-AUG-2010');
It will be useful.
-
Using cfquery GROUP of output within the intrusion via CFMAIL
Having a problem with the display of the CFQUERY results grouped in an intrusion via CFMAIL. After studying this question on these forums and the internet, I found some useful information, but have been unable to find the answer to my question...
Here's what I'm trying to do. I want to send an intrusion via CFMAIL to a single user. So far so good. I do not use CFOUTPUT in the intrusion via CFMAIL and it displays correctly the variables CF.
The problem is this: I have a CFQUERY that uses the GROUP setting and I want to display these results in AN e-mail. The display works if outside intrusion via CFMAIL:
< cfoutput query = "GetHoliday" group = "year" >
< b > #year # < /b > < br >
< cfoutput > #DateFormat(holiday,"mm/dd/yyyy") #-< / cfoutput > < br > < br >
< / cfoutput >The output looks like this:
2010
05/02/2010 - 05/03/2010 - 23/05/2010
2009
07/06/2009 - 05/07/2009 - 23/08/2009
However, inside the intrusion via CFMAIL it does not work. First of all, I took the CFOUTPUTs and used CFLOOP, but then I can't use the GROUP attribute.
I tried the attribute of the GROUP on the intrusion via CFMAIL, but who sends an e-mail by group. I want only an email sent and the results grouped into this one email as described above.
Any ideas on what I am doing wrong?
Or is there a way to run the group outside the intrusion via CFMAIL, store in a variable and display it somehow? I guess not since the query is a type of complex data...
loamguy wrote:
Any ideas on what I am doing wrong?
Or is there a way to run the group outside the intrusion via CFMAIL, store in a variable and display it somehow? I guess not since the query is a type of complex data...
I don't think you're doing something wrong. As far as I KNOW, there is no method integrated to group the content of the mail exactly in this way that you have described.
Yes, you could use cfsavecontent to capture grouped. Then include it in your e-mail message.
#year #.
#DateFormat(holiday,"mm/dd/yyyy") # -.
[email protected]"from ="[email protected]"subject ="Holidays">"
#mailContent #.
-
How to use the Group feature in insert or update
Hai All
How to use the Group feature in insert or update statement
I'm generating attendance so I have a different set of timing example
0800,1200,1230, 1700 and I need to insert data into the table that contains the intimate value min and max value for
outtime and othere to inertval time in or out
Pls tell me with some examples
For example
For INSERT
Insert into T2 (barcode, empcode, respondent, attend_date)
values (R2.cardn, R2.enpno, min(R2.) PtIMe), R2.pdate);
Update
Update dail_att set outtime = MAX (r2.ptime) where empcode = r2.enpno and barcode = r2.cardn and
attend_date = r2.pdate;
Here, in the place where I used to have so pls tell how to use
Thanks and greetings
Srikkanth.MHi Srikkanth.M
to insert:
insert into test (dummy) values ((select max (dummy) to double));
Update:
Update test dummy value = (select max (dummy) to double where to test them. XXXXField = double. XXXXField);
-
The use of group with into clause
Oracle forms 6i
Hai
While using a group function if is it possible to use would be to would adopt the how many times a record created one employee and to fill the number not in a variable
I tried like this, an error has occurred
SELECT count (*), barcode, bardate in temp_attendance cnt
where AT_DATE = bardate of bardate group, barcode;
Some allow you to set a good example
Thanks and greetings
Srikkanth.MSELECT count (*), barcode, bardate in temp_attendance cnt
where AT_DATE = bardate of bardate group, barcode;You choose 3 columns, but have only a returnitem, then how would that work?
select count(*),barcode,bardate into var1, var2, var3 from temp_attendance where AT_DATE = bardate group by bardate,barcode;
But I guess you have more than one bardate for each barcode for a SELECT INTO will cause an exception-TOO_MANY_ROWS, so you could go with a slider-loop, as
FOR rec in (select count(*),barcode,bardate into var1, var2, var3 from temp_attendance where AT_DATE = bardate group by bardate,barcode) LOOP --do something with each record END LOOP;
-
Error when you use the Group feature
Oracle forms6i
Hai
While I compile my coding it will compile correctly, but when I tried to run I revealed an error in the function of group
my code is
If (NTC <>0) then
Select the BAR code, RESPONDENT, OUTTIME today_bar, today_in, today_out from dail_att where BARCODE =: bar code
and ATTEND_DATE =: bardate;
Update dail_att set outtime = max(:bartime) where barcode =: bar code
and ATTEND_DATE =: bardate;
on the other
If (cnt2 <>0) then
Select RESPONDENT, OUTTIME in yest_in, yest_out from dail_att where BARCODE =: bar code
and ATTEND_DATE =: bardate-1;
If (yest_in is not null and yest_out is null) then
Update dail_att set outtime = max(:bartime) where barcode =: bar code
and ATTEND_DATE =: bardate-1;
on the other
insert into dail_att(barcode,intime,attend_date)
values (: Barcode, min(:Bartime),: bardate);
end if;
on the other
If: bartime between 0100 and 0630
insert into dail_att(barcode,intime,attend_date)
values (: Barcode, min(:Bartime),: bardate-1);
Update dail_att set outtime = max(:bartime) where barcode =: bar code
and ATTEND_DATE =: bardate-1;
on the other
insert into dail_att(barcode,intime,attend_date)
values (: Barcode,: min (Bartime),: bardate);
end if;
end if;
end if;
while I'm trying this groupfunction it throws error while I use seen tell me how to use the Group feature and where
to use
Regadrs
Srikkanth.MSrikkanth,
For this you need to calculate the max outside of the update statement and then use this value in the update statement.
The bartime is a control in the block?
If Yes, then you need to find the max manually, and if it isn't, then you can write a sub query to find the maximum value.
Kind regards
Manu.
If my response or response from another person was helpful, please mark accordingly
-
In 9i XMLAGG use to merge lines
Hello
I have some standard SQL that returns:
I want the output to be displayed in the form:Smith Parameter1 Value1 Smith Parameter2 Value2 Smith Parameter3 Value3 Jones Parameter1 Value1 Jones Parameter2 Value2
I've found that XMLAGG and XMLELEMENT functions make the case:Smith Parameter1 Value1 Parameter2 Value2 Parameter3 Value3 Jones Parameter1 Value1 Parameter2 Value2
The only thing is, the SQL command order initially lines does not appear when they are merged in a single line, so I can get:SELECT e.EMPLOYEE, RTRIM(XMLAGG(XMLELEMENT(my_element, p.P_NAME||' '||v.P_VALUE||' ')).extract('//text()'), ' ') FROM my_employees e, my_parameters p, my_parameter_values v WHERE v.P_ID = p.P_ID AND v.EMP_ID = e.EMP_ID GROUP BY e.EMPLOYEE
He returned in the correct order if I run the SQL without the XMLELEMENTS/XMLAGG function, so I guess it's a question of how the XMLAGG function parses the data?Smith Parameter1 Value1 Parameter3 Value3 Parameter2 Value2 Jones Parameter2 Value2 Parameter1 Value1
Is that what I can do to fix this problem or is there another approach (in 9i) that I can use to get the required result?
Thank you very much
Bagpuss
Published by: Bagpuss on July 22, 2010 03:36
Published by: Bagpuss on July 22, 2010 03:39Bagpuss says:
Is that what I can do to fix this problem or is there another approach (in 9i) that I can use to get the required result?The ORDER BY for XMLAGG clause gives you good results?
SELECT e.EMPLOYEE, RTRIM(XMLAGG(XMLELEMENT(my_element, p.P_NAME||' '||v.P_VALUE||' ') ORDER BY p.P_NAME).extract('//text()'), ' ') FROM my_employees e, my_parameters p, my_parameter_values v WHERE v.P_ID = p.P_ID AND v.EMP_ID = e.EMP_ID GROUP BY e.EMPLOYEE
Maybe you are looking for
-
What's data uninstalled this app?
On my iPhone 6 Plus with 9.3.2,and under settings > cell phone, all the way down... I see this. How can I remove that permanent 1.1 GB? I can't touch. Its just the text.
-
Satellite U400-128 does not start after hibernation
Hello I currently have problems with my Toshiba laptop. I use it for internet, games, multimedia, programming... Yesterday, when I went to bed, I close the lid that does the same thing as usual--went to hibernation. But today when I tried to start th
-
Satellite P100-119: have no right to run Power Saver
Hello I have a question for the powersaver. I downloaded and installed, but every time when I want to launch the program, a window comes with massage, that I do not have the rights to run this program. What I'd do this p100-119 notbooks one book prog
-
T450 - Windows 7 Pro - switch are not sent to sleep
Hello I have a Win7 pro installed on my T450. But the power button sends your laptop to sleep. It doesn't do anything. I checked that in power option ' when I press the power button: ' he 'Sleep' value in both "on battery" and "Plugged in". " What's
-
Limiting the movement of the scroll bar
Hello I use a secondary in my VI. It shows all the values, but I want to limit the movement of the scroll bar. Exactly I don't want than the scroll bar controls where. Vicen LV 2010-7.1 with Windows XP