How to use GROUP BY in ODI
how to use GROUP BY in ODI tool
Hi ,
you can combine the insert stamt with the select ....so that in the target u will get a single line .....
SQL> select * from prop_details;
PROPERTY RELAVANTD NOTICES
10100 25-JAN-09 30
10100 03-JAN-09 30
10100 02-DEC-08 20
10100 01-DEC-08 10
10100 31-DEC-08 20
10101 10-JAN-09 10
10101 20-JAN-07 15
10101 30-DEC-08 45
10101 20-FEB-08 35
10101 31-JAN-09 25
10 rows selected.
SQL> select PROPERTY,max(RELAVANTDATE),SUM(NOTICES) from PROP_DETAILS GROUP BY P
ROPERTY;
PROPERTY MAX(RELAV SUM(NOTICES)
10101 31-JAN-09 130
10100 25-JAN-09 110
SQL>
Similar Messages
-
How to use "group" in iTunes?
Hi...
Need advice:
Any ideas for how to use "Groups" under album "info" (cmd i)
(my iTunes is in Swedish, I am not sure what the English names are)
This function has such a central position in "song info" but I cant understand how to use it...
Best regardsWhen I look in Edit > Preferences > General tab I find that the Libray name is still one of the old ones
Then you are not opening a new library.
If I rename to the library name it should be it still puts files in the wrong place.
You should not rename the libraries. -
How to use group function in insert or update
Hai All
How can we use group function in insert or update statement
I am generating an attendance so i have different set of timing for example
0800,1200,1230, 1700 and i need to insert into these data into table with min value to intime and max value to
outtime and othere to inertval time in or out
Pls tell me with some example
For example
For INSERT
insert into T2 (barcode,empcode,intime,attend_date)
values(r2.cardn,r2.enpno,MIN(r2.ptime),r2.pdate);
For UPDATE
update dail_att set outtime= MAX(r2.ptime) where empcode=r2.enpno and barcode=r2.cardn and
attend_date=r2.pdate;
Here instead of where i need to use having so pls tell how to use
Thanks & Regards
Srikkanth.MHai Man
R2 is not a table name its a record
Let me explain clearly
I have to generate daily attendance for lot of employees So i have two table t1 and t2
T1 consist of three column empno,date,time
T2 consist of empno,name,date,intime,outtime,intrin,introut
So now i need to give the T1 Min value Of time to T2 Intime and T1 Max value of Time to T2 Outtime fields so there so many records while i am using
max(time) it gives the max value of all so i seperated by group function so now i have an error in subquery ie it is an single row subquery so i need to use multiple row subquery how i can use multiple row subquery in update statement
Thanks In Advance
Srikkanth.M -
How to use dual table in ODI in source side for nested queries?
Hi,
Any idea how to use dual table in source for more than once. I want to build a ODI interface for the following source query
SELECT ACTV_TYP.ACTV_TYP_SRC_CD, ACTV_TYP.ACTV_TYP, PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
FROM
SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BRKR_PORTS'
AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
(SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BANKS'
AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS,
(SELECT 1 ACTV_TYP_SRC_CD, '?????' ACTV_TYP FROM DUAL
UNION ALL
SELECT 2 ACTV_TYP_SRC_CD, '???????' ACTV_TYP FROM DUAL) ACTV_TYP
RegardsIf the below query is equivalent , it seems you don't need dual table at all , just default the values in the interface.
You are using dual tables to populate values ACTV_TYP.ACTV_TYP_SRC_CD, ACTV_TYP.ACTV_TYP values. Look at your query in the following manner :
SELECT '1', '?????', PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
FROM
SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BRKR_PORTS'
AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
(SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BANKS'
AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS
UNION
SELECT 2 , '??????', PORT_ACTV_TYP.PORT_ACTV_TYP_SRC_CD, PORT_ACTV_TYP.PORT_ACTV_TYP, SFT_DLT_STS.SFT_DLT_STS_SRC_CD, SFT_DLT_STS.SFT_DLT_STS
FROM
SELECT LOW_VALUE PORT_ACTV_TYP_SRC_CD, MEANING PORT_ACTV_TYP
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BRKR_PORTS'
AND COLUMN_NAME = 'WORK_PORT_TYPE') PORT_ACTV_TYP,
(SELECT LOW_VALUE SFT_DLT_STS_SRC_CD, MEANING SFT_DLT_STS
FROM CUSTOMS.DOMAIN_ALLOW_COLUMNS_VALUES
WHERE TABLE_NAME = 'BANKS'
AND COLUMN_NAME = 'REC_STATUS') SFT_DLT_STS
Now you can use dataset to make UNION. -
How to use Group Policy to remove the shutdown button on the logon screen
Environment: Shared use computers running Window 7 Professional and MS office Suite; Windows 2008 Standard server, Windows 7 EC Domain Policy and MS Office 2007 ADML Template downloaded from Microsoft. WIndows 7 Accounts OU.
I am in the process of developing a shared use computer lockdown policy for several Windows 7 computers that will made available in my client's computer lab. I need to use a group policy setting to remove the Shut Down button on
the logon screen of the Windows 7 client computers. I am editing the Windows 7 EC Domain Policy to user accounts in a Windows 7 Accounts OU that I created. I am using the Group Policy editor in the Group Policy Management Console.
Please let me know the best practice for accomplishing this using Group Policy editor.
Thanks.
P.S. I tried a setting recommended in the following link in the Windows 7 EC Domain Policy which did not seem to work.
http://www.windowsitpro.com/article/group-policy/can-i-use-group-policy-to-display-or-remove-the-shut-down-button-on-the-logon-screen-.aspxHi Vernon,
I tried the group policy you mentioned (Computer Configuration, Windows Settings, Security Settings, Local Policies, and select Security Options, "Shutdown: Allow system to be shut down without having to log on") and it worked on a Windows 7 client.
Thus you may need to check if the group policy you created is actually applied to clients.
A screenshot can be found here:
http://cid-b7ed40feb32ba29f.office.live.com/self.aspx/.Public/desktop/Capture.JPG -
How to use groups as invitees for an event in calendar.
How can I use a group from contacts as an invitee in calendar?
OOPS!!
I posted my question in the wrong community -
How to use Update Statement in ODI Procedure
Hi,
How can I use an update statement inside an ODI procedure.
ThanksHi,
You do not need the BEGIN and END. ODI procedures are free text, so you can simply write your update statement, as you would in toad/sql developer etc etc. Just make sure you set the Technology and the logical schema. It is how ever best practice to also use the API:
<%=odiRef.getSchemaName("YOUR_LOGICAL_SCHEMA_NAME", "D")%>. to prefix tables. This way, you select data from different schema's in the same instance (as long a your user has the correct privs).
Cheers
Bos
Edited by: Bos on Jun 22, 2011 3:09 PM -
How to use group by in PL/SQL
Can anyone give me a clue how to group rows using PL/SQL? I want to make a push button that groups a number of rows. When I run the form and push the button, I get the Oracle 01422 error. I am using one data block and, after pressing execute on the Oracle form in the web browser, I want to sort the rows using the group by clause as a pl sql trigger in a push button (with the WHEN BUTTON PRESSED trigger). I am new to Oracle Forms.
I managed to use a cursor to access and display each row. I have to press the command button I created once for access of each row individually. I want to be able to push the button once, and populate each row with a record from my table. I am using the tabular format. Here is my code:
DECLARE
CURSOR email_message_cur
IS
SELECT sender, subject, body, date_time_sent
FROM Email_Message
ORDER BY sender;
BEGIN
OPEN email_message_cur;
FETCH email_message_cur
INTO :GROUP_EMAIL_MESSAGE.SENDER, :GROUP_EMAIL_MESSAGE.SUBJECT, :GROUP_EMAIL_MESSAGE.BODY, :GROUP_EMAIL_MESSAGE.DATE_TIME_SENT;
WHILE email_message_cur%FOUND LOOP
IF :GROUP_EMAIL_MESSAGE.SENDER IS NOT NULL THEN
CREATE_RECORD;
END IF;
FETCH email_message_cur INTO :GROUP_EMAIL_MESSAGE.SENDER, :GROUP_EMAIL_MESSAGE.SUBJECT, :GROUP_EMAIL_MESSAGE.BODY, :GROUP_EMAIL_MESSAGE.DATE_TIME_SENT;
END LOOP;
CLOSE email_message_cur;
END; -
How to use Group by clause in Infoset
Hi,
I have a infoset where I am using two DSO .Now want to use the group by clause on basis of day, month, quarter .And also I want to use the left outer join .SO how will I do that ?
Can somebody help me to to get these solved ?
Regards
SunitHi,
for me it seems like Multiprovider is the one which we use in case when we want to go for group by option. This infoset is more kind of intersection operation.
go through this link for more detailed info on Infoset
http://help.sap.com/saphelp_nw2004s/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm
Regards,
rik -
How to use oracle partition in ODI
hi all,
i have a oracle database with daily partition. partition syntex is tbl_abc partition(20090909), now i want to use it in interface..
kindly tell the way...
Regard
NaseerHi Naseer,
How are you?
ODI doesnt support partition. You can do a work around for that by creating a VIEW out of that partition name, reverse it in ODI and use that as a source.
Like,
CREATE TABLE sales_range
(salesman_id NUMBER(5),
salesman_name VARCHAR2(30),
sales_amount NUMBER(10),
sales_date DATE)
PARTITION BY RANGE(sales_date)
PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('02/01/2000','DD/MM/YYYY')),
PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('03/01/2000','DD/MM/YYYY')),
PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('04/01/2000','DD/MM/YYYY')),
PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('05/01/2000','DD/MM/YYYY'))
create view sales_jan200 as select * from sales_range PARTITION (sales_jan2000);
Makes sense?
Thanks,
G -
How to use Group in Query Print Layout
Hi All,
I have prepared a query for fetching all purchase details along with tax code, now I have ordered it on tax code and prepared a query Print Layout,
Now within this Query Print Lay Out I want to group the tax code and want to add total of some columns at end of every tax code.
Request to guide how to achieve this.
Thanking you in advance,
Samir GandhiWe need to use Sort and Group in combination.
Select the repeatative area and in PLD menu select Sort, then select the column to be sort.
then in Header / Footer of that respective repeatative area select the fields and put in the group no. in the General. -
Crystal Reports 11 - How to use group in footer
hello
i have a recordset of multiple branches and that is grouped by customer already. a customer can buy goods from multiple branches so it is summery of customers with their goods. and i need the summery of branches with detail like i have attached an image
in this image it is the record of one customer with 4 goods which are from 2 branches and in footer it is summery of both branches. i'm having issue here while m showing summery of both branches.so how can i show this summary and it is not sure always that there is only 2 branches. it can be 1 or many.
i'm using Crystal Report 11Hi Amit,
Use a subreport to show the branch wise summary. Here's a bird's eye view of what you might have to do:
1) Insert a Subreport pointing to the same table on the Group Header
2) Right-click the Subreport > Change subreport links > Move the CustomerID or any field that uniquely identifies each customer to the Pane on the right > From the dropdown at the bottom right that reads 'Select data in Subreport based on field', choose the same field. This will link the customer fields from both the datasources.
3) Inside the Subreport, create a group on the Branch Field and place all the required summary fields etc
4) Suppress unwanted sections in the Subreport > Right-click the Subreport > Format Subreport > Uncheck 'Keep Object Together'.
-Abhilash -
How to use useMaxValue property in ODI for XML?
Hello All,
I am using 11.1.1.5 version of ODI. I want to use "useMaxValue" for which description is given as follows by oracle.
When this property is set to true, elements for which maxOccurs is not specified in the XSD are considered as maxOccurs ="unbounded". Otherwise, the driver assumes that maxOccurs=1 when maxOccurs is not specified.
when I use this property as useMaxValue in the JDBC url for XML technology I get the following error.
ODI-1227: Task SrcSet0 (Loading) fails on the source XML connection XML FILE.
Caused By: java.sql.SQLException: ODI-40717: Unknown parameter : usemaxvalue
I am trying to get multiple records for the same elements in XML for this I am using this property. Is there any other way to get it done?
Thanks in Advance!please try uimv or useimplicitmaxvalue. I justed tried, both works well. I will file a doc bug to track the issue, maybe document need change, maybe code, waiting bug updates.
Edited by: tina.wang on Oct 7, 2012 9:28 AM -
How to use group by in tabular form
Hi all
i have a tabular form and i need to issue the goods not more then five and in 1 row i will issue only 1 qty
so i use only five rows . but by mistake i will use 6 rows then it is wrong how to restrict it
please guide
Thanks and Regards
vikasHi Ammad Ahmed
i have a order of dresses
Dress name qty
a 5
b 8
c 55
d 8
now i issuing it for production
and the issuing form is tabular and the way of issuing is like this
dress name qty
a 1
a 1
b 1
a 1
a 1
a 1
d 1
d 1
i need when i issue for production then i need to calculate the a,b and d are not more then the orderThanks and Regards
Vikas Singhal
Edited by: vikas singhal on Jan 14, 2011 3:46 PM -
hi,
I want to use aggregate functions (group and sum ) in azure mobile service?
e.g
my table is Expense and attribute id, name, amount, categories.
I want to group by categories and sum by amount attribute.
thanksHi
You can write things like this:
var sql = "SELECT MAX(Id) as Id, Uri FROM Channel " +
"GROUP BY Uri HAVING COUNT(*) > 1";
Please mark post as answered if it helped!
Maybe you are looking for
-
Error while calling a Webservice from a custom findBy operation
Hello I have created an External Service by importing a WebService(XI) which is a wrapper for BAPI BAPI_VENDOR_GETDETAIL. Tested the webservice and it works fine. I created an Entity Service Vendor and created 4 attributes vendorNo and companyCode, v
-
Best practice in datawarehousing
This is the scenario for the client I am working with. They are taking data in the obiee reports , directly from essbase cube. ETL used is SSIS and schedular is Control M . Some times our client faced issue of server going down , still they are not d
-
Server process id (Server PID).
Hi friends, I wanted server process id (Server PID). i have executed the below query on SQL+ select p.spid from v$session s, v$process p where s.paddr = p.addr and s.audsid = to_number(sys_context('USERENV','SESSIONID'));i got an error > ORA-00942: t
-
I convered a pdf file to excel, where do i find it
i convered a pdf file to excel, where do i find it
-
I execute the configuration wizard to create a domain with Portal, forms, REports and Discoverer 11.1.1.3 (before I install Weblogic 10.3.3 and OFM 11.1.1.2 only software): Executing Task: Iniciando Servidor Gestionado: WLS_REPORTS XXX: adding task: