Require help for query
hi all,
i had 3 tables
1) SERV_AUTH_DETAIL WITH COLUMNS
SERV_AUTH_DETAIL_ID
NUMBER_OF_UNITS
UNIT_COST
SERV_ID
2) PUR_ORDER_DETAIL WITH COLUMNS
PUR_ORDER_DETAIL_ID
PUR_ORDER_ID
NUMBER_OF_UNITS
UNIT_COST
SERV_AUTH_DETAIL_ID
3) PUR_ORDER WITH COLUMNS
PUR_ORDER_ID
SERV_AUTH_ID
PUR_ORDER_STATUS
when i issue the following update statement, i got the error stating
column ambiguously defined
update t_serv_auth_detail
set number_of_units = (select number_of_units
from t_pur_order_detail pod
join t_serv_auth_detail sa
on
pod.serv_auth_detail_id = sa.serv_auth_detail_id
and pod.pur_order_id = 1)
where serv_auth_detail_id = (select s.serv_auth_detail_id
from t_pur_order_detail p
join t_pur_order po
on
p.pur_order_id = po.pur_order_id
and po.pur_order_id = 1)
ERROR at line 2:
ORA-00918: column ambiguously defined
could anyone give guidelines to correct this error.
thanks in advance.
rampa
In your UPDATE statement:
UPDATE t_SERV_AUTH_DETAIL SA
SET NUMBER_OF_UNITS = (SELECT NUMBER_OF_UNITS
FROM t_PUR_ORDER_DETAIL POD
WHERE POD.SERV_AUTH_DETAIL_ID = SA.SERV_AUTH_DETAIL_ID
AND POD.PUR_ORDER_ID = 1)
WHERE SERV_AUTH_DETAIL_ID = (SELECT P.SERV_AUTH_DETAIL_ID
FROM t_PUR_ORDER_DETAIL P
JOIN t_PUR_ORDER PO
ON P.PUR_ORDER_ID = PO.PUR_ORDER_ID
AND PO.PUR_ORDER_ID = 1);the 2nd subquery - SELECT P.SERV_AUTH_DETAIL_ID...
is returning more than one row and you have used a "=" operator to match it. That's the reason for that ORA error.
pratz
Similar Messages
-
Hi All....
Required help for one more query.
I have a table with data like this:
Cust_id Transaction_no
111 1
111 2
111 3
111 4
111 5
111 6
222 7
222 8
333 9
333 10
333 11
333 12
I wrote the following query :
select cust_id, ntile(3) over (order by cust_id) "Bucket" from trans_detls
The output is like this :
Cust_id Bucket
111 1
111 1
111 1
111 1
111 2
111 2
222 2
222 2
333 3
333 3
333 3
333 3
The problem is that I dont want the cust_id to overlap in buckets. That is one cust_id should be present in only one bucket.
Is this possible?
Thanks in advance.
AmeyaOr Something like..
SQL> select * from test;
ID NO
111 1
111 2
111 3
111 4
111 5
111 6
222 7
222 8
333 9
333 10
333 11
333 12
12 rows selected.
SQL> select id, ntile(3) over (order by rn) "Bucket"
2 from(
3 select id,row_number() over(partition by id order by no) rn
4 from test);
ID Bucket
111 1
222 1
333 1
111 1
222 2
333 2
111 2
333 2
111 3
333 3
111 3
111 3
12 rows selected. -
Required help for java web url of BI Query
hello Experts,
Here is my scnenario: I am having a BI query lest's say xxxx. now i have build url and passed the query parameters in URL. Still the query is not taking that varialble values and showing the parameter screen. My requirement is the query should execute with the parameters which are passed in the URL. It should not ask for the parameter screen.
Help will be really appriciated.
thanks in advance.Where is the dll ?
you need to include it in a jar, and ref that jar with
<nativelib href=<url to the jar>/>
and request all-permissions in you jnlp file (and sign both jars)
/Andy -
Hi all..
I required some help in writing a query..
My table is like this
Cust_id Cust_type Del_status Incharge
111 Gold HD
222 Gold
333 Gold HD
444 Gold
123 Gold HD
456 Gold
789 Gold HD
987 Gold
555 Silver HD
666 Silver HD
777 Silver
888 Silver
I want a query to generate this output
Cust_id Cust_type Del_status Incharge
111 Gold HD 1
222 Gold 1
333 Gold HD 1
444 Gold 1
555 Silver HD 1
777 Silver 1
123 Gold HD 2
456 Gold 2
789 Gold HD 2
987 Gold 2
666 Silver HD 2
888 Silver 2
The query basically allocates the customers to incharges... based on cust_type and del_status.
there are 3 categories, Gold Customers, Silver Customers and HD customers..
It should divide this three equally amongst the 2 incharges...
Also this is just a sample data... actually table consists of around 3Lac customers and 12 incharges
Sorry if its a incorrect post..
Thanks in advance..Is there a way to find the value for ntile(2) dynamically?
I tried something like
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> with mytable as (select 111 cust_id, 'Gold' cust_type, 'HD' del_status from dual UNION ALL
2 select 222 cust_id, 'Gold' cust_type, null del_status from dual UNION ALL
3 select 333 cust_id, 'Gold' cust_type, 'HD' del_status from dual UNION ALL
4 select 444 cust_id, 'Gold' cust_type, null del_status from dual UNION ALL
5 select 123 cust_id, 'Gold' cust_type, 'HD' del_status from dual UNION ALL
6 select 456 cust_id, 'Gold' cust_type, null del_status from dual UNION ALL
7 select 789 cust_id, 'Gold' cust_type, 'HD' del_status from dual UNION ALL
8 select 897 cust_id, 'Gold' cust_type, null del_status from dual UNION ALL
9 select 555 cust_id, 'Silver' cust_type, 'HD' del_status from dual UNION ALL
10 select 666 cust_id, 'Silver' cust_type, 'HD' del_status from dual UNION ALL
11 select 777 cust_id, 'Silver' cust_type, null del_status from dual UNION ALL
12 select 888 cust_id, 'Silver' cust_type, null del_status from dual UNION ALL
13 select 1001 cust_id, 'Copper' cust_type, null del_status from dual UNION ALL
14 select 1002 cust_id, 'Copper' cust_type, 'HD' del_status from dual UNION ALL
15 select 1003 cust_id, 'Copper' cust_type, null del_status from dual
16 )
17 select t1.cust_id
18 , t1.cust_type
19 , t1.del_status
20 --, ntile(3) over (partition by nvl(t1.del_status,t1.cust_type) order by t1.cust_id)
21 , ntile((select count(distinct nvl(t2.del_status,t2.cust_type))-1 from mytable t2)) over (parti
tion by nvl(del_status,cust_type) order by cust_id)
22 incharge
23 from mytable t1
24 order by incharge, t1.cust_type, t1.cust_id
25 /
, ntile((select count(distinct nvl(t2.del_status,t2.cust_type))-1 from mytable t2)) over (partition
ERROR at line 21:
ORA-30488: argument should be a function of expressions in PARTITION BY
SQL> The number of incharges could change during the time.
Message was edited by:
Sven Weller -
Required help for badi for GL tab in MIRO transaction
Hi,
I am working in MIRO transaction.
I am having a requirement as below:
While creating invoices, In the gl tab when we enter gl account number system should populate Tax jurisdiction code by default.
I am using BADI EXTENSION_US_TAXES method MM_ITEM_TAX_MODIFY but it populates the tax jurisdiction in PO reference tab not in GL tab.
Please advice
Regards,
Suvarna NandiHi
Have you tried with enhancement FYTX0002? See also Note 302998 - Collecting fields for user-exit. It's an idea.
I hope this helps you
Regards
Eduardo -
Hi,
I'm facing an issue related to the variable search help.
I have a query which has been recently migrated to 7.0. When I open the query on Analyzer and look for values in a variable it is throwing me the relevent values for that particular variable itself, which is perfect.
When I run the same query on portal, and look for variable input values, I'm getting all the master data entries along with the variable value. I do not want all these other master data entries.
Please help.Hi,
There are two possible read modes for the value help of variables:
- Read mode "M" means "Values in master data table".
- Read mode "D" means "Only values in InfoProvider".
Please set related setting in infoobject level it should resolved your issue.
Regards,
Venkat -
Application Help for Query Designer for Netweaver 2004S
Does anyone know how to install the Help Files for the Business Explorer Tool for Netweaver 2004S? When I click on the Help>>Applicaton Help from any of these tools, it states it can't find the files. I have it setup and working within ABAP.
Thanks,
Jeff CookThe help dvd that came with upgrade explains how to setup for the ABAP side, not the Query Designer. Do you know the parameter settings? Does Query Designer help use the sapdoccd.ini file?
Thanks ,
Jeff -
Need help for query... exam incoming...
ARTIST(CodA,NameA)
WORK(CodW,Title,AuthorCode,ExpositionCode)
Question:
For each ExpositionCode, find the artists with the greater number of exposed works
Pls... help!!
FabioIt's running, i have only to remove title
italics with howmuch as
italics(select ExpositionCode,AuthorCode,count(*) n from work
italicsgroup by ExpositionCode,AuthorCode)
italicsselect ExpositionCode,AuthorCode,n from howmuch h1,ARTIST a
italicswhere h1.n=(select max(n) from howmuch h2 where h2.ExpositionCode=h1.ExpositionCode)
italicsand a.CodA=h1.AuthorCode
I have only a little problem... i can't use "with" clause in the exam, can u write a running query without that? -
Hi All,
Here is requirement
User X has View only and Account manager Role then we don't need to report any changes for him. And if User Y has View Only role then we need to report his activity.
select u.loginname, p.firstname,p.lastname,g.name
from sc_user u, bqperson p, sc_acl_group_mem gm,
sc_acl_group g,sc_acl_group gnm
where u.bqperson = p.tril_gid and u.tril_groups = gm.collectiongid AND gm.objectgid =
g.tril_gid AND
(g.NAME LIKE 'VIEW ONLY' OR g.NAME LIKE 'SME%')
ORDER BY loginname
Here is out put
LOGINNAME FIRSTNAME LASTNAME NAME
b684276 xxx xxx VIEW ONLY
default Guest User VIEW ONLY
n105371 Adil Khan SME EXGRATIA ADMINISTRATOR
n105371 Adil Khan SME SERVICE CENTRE SUPERVISOR
n105371 Adil Khan SME PROMOTIONS ADMINISTRATOR
n105557 Emmanuel Kajjor SME EXGRATIA ADMINISTRATOR
n105557 Emmanuel Kajjor SME SERVICE CENTRE SUPERVISOR
n105740 Priya Ghag SME EXGRATIA ADMINISTRATOR
n105740 Priya Ghag SME SERVICE CENTRE SUPERVISOR
n106311 Megha Nalawade SME EXGRATIA ADMINISTRATOR
n106311 Megha Nalawade SME SERVICE CENTRE SUPERVISOR
n106311 Megha Nalawade SME PROMOTIONS ADMINISTRATOR
n107864 Ragini Sule SME EXGRATIA ADMINISTRATOR
n107864 Ragini Sule SME SERVICE CENTRE SUPERVISOR
n107864 Ragini Sule SME PROMOTIONS ADMINISTRATOR
n110022 Harikrishna Kurup SME EXGRATIA ADMINISTRATOR
n110022 Harikrishna Kurup SME SERVICE CENTRE SUPERVISOR
n110022 Harikrishna Kurup SME PROMOTIONS ADMINISTRATOR
n110450 Rachana Vasandani SME EXGRATIA ADMINISTRATOR
n110450 Rachana Vasandani SME SERVICE CENTRE SUPERVISOR
n110932 Jigna Trivedi SME EXGRATIA ADMINISTRATOR
n110932 Jigna Trivedi SME PROMOTIONS ADMINISTRATOR
n110932 Jigna Trivedi SME SERVICE CENTRE SUPERVISOR
Please advice
Thanks in advance
SachinHi Sudeep,
Account manager is Simply a role like View Only and 'SME %'
Some user can have Roles Like 'View only' ,'Account manager' ,'SME%' They are all differnt Role
Some user Can have only 'View only' Role
Some user can have 'SMe%' Role
Some user can have 'SMe%' , 'Account manager' Role
etc probabilites
I want to retrieve the record for thiose user who have 'View only' Role or 'SMe%' Role
Some times it might happened user can have 'View only' ,'Account manager' ,'SME%' .This should come in list
if USer has any role with 'Account Manager' its result should not appear in Query other wise it should appear -
Help for query!!!
Dear All,
My query shows following type of output;
Query:
select b.yearqtr,b.cgs_code,b.code,b.name1,b.total--,a.total1
from ibs_cbs_temp b,(select name1,sum(total) as total1
from ibs_cbs_temp
group by name1) a
where b.name1 = a.name1
group by b.name1,b.yearqtr,b.cgs_code,b.code,b.total,a.total1
order by a.total1 desc,b.name1;
Output:
YEARQTR CGS_CODE CODE NAME1 TOTAL
20051 2 HK HONG KONG 2559
20044 2 HK HONG KONG 5465
20052 2 HK HONG KONG 11332460
20044 1 GB UNITED KINGDOM 5355
20051 1 GB UNITED KINGDOM 9742
20052 1 GB UNITED KINGDOM 6960160
20044 2 SG SINGAPORE 3097
20051 2 SG SINGAPORE 3529
20052 2 SG SINGAPORE 4695826
20051 6 IO BRITISH INDIAN OCEAN TERRITORY 15
20052 6 IO BRITISH INDIAN OCEAN TERRITORY 100
20051 6 1W BRITISH OVERSEAS TERRITORIES (INCL. CHAGOS) 250
20052 6 1W BRITISH OVERSEAS TERRITORIES (INCL. CHAGOS) 320
20044 5 BF BURKINA FASO (FORMERLY UPPER VOLTA) 120
20051 5 BF BURKINA FASO (FORMERLY UPPER VOLTA) 780
20052 5 BF BURKINA FASO (FORMERLY UPPER VOLTA) 60
20044 5 BI BURUNDI 550
20051 5 BI BURUNDI 220
20052 5 BI BURUNDI 20
Here for
BRITISH INDIAN OCEAN TERRITORY,BRITISH OVERSEAS TERRITORIES (INCL. CHAGOS) these two countries there are no records
for 20044 YEARQTR. For this I want to display 0 values
like;
20051 2 SG SINGAPORE 3529
20052 2 SG SINGAPORE 4695826
20044 2 SG SINGAPORE 0Is there any solution for this.
Please help me.
Thanks In advance,
Prathamesh.Use this query to obtain all conbinations for yearqty and name1
select a.yesrqtr, b.name1 FROM
(select distinct yearqtr from ibs_cbs_temp) a,
(select distinct name1 from ibs_cbs_temp) b;
Add the above query to the join
Also the the join criteria and b.yearqtr=a.yearqtr
select b.yearqtr,b.cgs_code,b.code,b.name1,b.total
from ibs_cbs_temp b,
(select name1,sum(total) as total1 from ibs_cbs_temp group by name1) a,
(select a.yesrqtr, b.name1 FROM
(select distinct yearqtr from ibs_cbs_temp) a,
(select distinct name1 from ibs_cbs_temp) b) c
where b.name1 = a.name1
and b.yearqtr=a.yearqtr
and b.name1(+)=c.name1
and b.yearqtr(+)=c.yearqtr
order by a.total1 desc,b.name1; -
hello all
my one of query is returning result in 1-2 mins only for 1 lakh record but i am not sure if it showed me complete rows or not because when I an trying to get count of result ..its taking lot of time .when I am using this query on plsql code ..code is running slow so just wanted to confirm on query tuning point of view if its fine or not ..please look onto it and let me know if query is fine or not by explain plan .my oracle version is 11g
this is my query
SELECT ROWNUM , TRUNC(rownum/5000) + 20000 ,'FOR_UPDATE', sku_org.NAME ,
acct_promo_sku.src_num , acct_promo_sku.sub_type ,
promo_actual.sku_actual_pos
FROM siebel.s_src acct_promo_hdr,
siebel.s_src acct_title_format,
siebel.s_src acct_promo_sku,
siebel.s_src_x acct_promo_hdrx,
siebel.s_src_x acct_promo_skux,
siebel.s_prod_int prod,
siebel.s_bu promo_hdr_org,
siebel.s_bu sku_org,
siebelwb.stg_sbl_acct_promo_actuals2 promo_actual
WHERE acct_promo_hdr.sub_type = 'PLAN_ACCOUNT_PROMOTION'
AND acct_promo_hdr.row_id = acct_title_format.par_src_id
AND acct_title_format.sub_type = 'PLAN_ACCT_PROMOTION_CATEGORY'
AND acct_title_format.row_id = acct_promo_sku.par_src_id
AND acct_promo_sku.sub_type = 'PLAN_ACCOUNT_PROMOTION_PRODUCT'
AND acct_promo_hdr.row_id = acct_promo_hdrx.par_row_id
AND acct_promo_sku.row_id = acct_promo_skux.par_row_id(+)
AND acct_promo_sku.prod_id = prod.row_id
AND acct_promo_hdr.bu_id = promo_hdr_org.row_id
AND acct_promo_sku.bu_id = sku_org.row_id
AND prod.x_prod_material_num = promo_actual.material_number
and prod.X_PROD_SALES_ORG=promo_actual.sales_org
AND acct_promo_hdr.row_id = promo_actual.acct_promo_id
and nvl(acct_promo_hdr.pr_accnt_id,0)=nvl(promo_actual.acct_siebel_rowid,0)
and nvl(acct_promo_hdr.x_indirect_id,0)=nvl(promo_actual.indirect_acct_siebel_rowid,0)
AND promo_actual.load_date >= TRUNC(SYSDATE)
AND promo_actual.load_date < TRUNC(SYSDATE + 1)
explain plan
PLAN_TABLE_OUTPUT
Plan hash value: 3864590768
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 298 | 2300 (1)| 00:00:28 |
| 1 | COUNT | | | | | |
|* 2 | FILTER | | | | | |
| 3 | NESTED LOOPS | | | | | |
| 4 | NESTED LOOPS | | 1 | 298 | 2300 (1)| 00:00:28 |
| 5 | NESTED LOOPS OUTER | | 1 | 273 | 2298 (1)| 00:00:28 |
| 6 | NESTED LOOPS | | 1 | 263 | 2296 (1)| 00:00:28 |
| 7 | NESTED LOOPS | | 1 | 236 | 2295 (1)| 00:00:28 |
| 8 | NESTED LOOPS | | 1 | 165 | 2292 (1)| 00:00:28 |
| 9 | NESTED LOOPS | | 1 | 117 | 2289 (1)| 00:00:28 |
| 10 | NESTED LOOPS | | 1 | 109 | 2289 (1)| 00:00:28 |
| 11 | NESTED LOOPS | | 1 | 99 | 2287 (1)| 00:00:28 |
|* 12 | TABLE ACCESS FULL | STG_SBL_ACCT_PROMO_ACTUALS2 | 1 | 49 | 2285 (1)| 00:0
|* 13 | TABLE ACCESS BY INDEX ROWID| S_SRC | 1 | 50 | 2 (0)| 00:00:01 |
|* 14 | INDEX UNIQUE SCAN | S_SRC_P1 | 1 | | 1 (0)| 00:00:01 |
|* 15 | INDEX RANGE SCAN | S_SRC_X_U1 | 1 | 10 | 2 (0)| 00:00:01 |
|* 16 | INDEX UNIQUE SCAN | S_BU_P1 | 1 | 8 | 0 (0)| 00:00:01 |
|* 17 | TABLE ACCESS BY INDEX ROWID | S_SRC | 1 | 48 | 3 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | S_SRC_F2 | 2 | | 2 (0)| 00:00:01 |
|* 19 | TABLE ACCESS BY INDEX ROWID | S_SRC | 1 | 71 | 3 (0)| 00:00:01 |
|* 20 | INDEX RANGE SCAN | S_SRC_F2 | 2 | | 2 (0)| 00:00:01 |
| 21 | TABLE ACCESS BY INDEX ROWID | S_BU | 1 | 27 | 1 (0)| 00:00:01 |
|* 22 | INDEX UNIQUE SCAN | S_BU_P1 | 1 | | 0 (0)| 00:00:01 |
|* 23 | INDEX RANGE SCAN | S_SRC_X_U1 | 1 | 10 | 2 (0)| 00:00:01 |
|* 24 | INDEX UNIQUE SCAN | S_PROD_INT_P1 | 1 | | 1 (0)| 00:00:01 |
|* 25 | TABLE ACCESS BY INDEX ROWID | S_PROD_INT | 1 | 25 | 2 (0)| 00:00:
Predicate Information (identified by operation id):
2 - filter(TRUNC(SYSDATE@!)<TRUNC(SYSDATE@!+1))
12 - filter("PROMO_ACTUAL"."LOAD_DATE">=TRUNC(SYSDATE@!) AND "PROMO_ACTUAL"."LOAD_DATE"<TRUNC(SYSD
13 - filter("ACCT_PROMO_HDR"."SUB_TYPE"='PLAN_ACCOUNT_PROMOTION' AND
NVL("ACCT_PROMO_HDR"."PR_ACCNT_ID",'0')=NVL("PROMO_ACTUAL"."ACCT_SIEBEL_ROWID",'0') AND
NVL("ACCT_PROMO_HDR"."X_INDIRECT_ID",'0')=NVL("PROMO_ACTUAL"."INDIRECT_ACCT_SIEBEL_ROWID",'0'
14 - access("ACCT_PROMO_HDR"."ROW_ID"="PROMO_ACTUAL"."ACCT_PROMO_ID")
15 - access("ACCT_PROMO_HDR"."ROW_ID"="ACCT_PROMO_HDRX"."PAR_ROW_ID")
16 - access("ACCT_PROMO_HDR"."BU_ID"="PROMO_HDR_ORG"."ROW_ID")
17 - filter("ACCT_TITLE_FORMAT"."SUB_TYPE"='PLAN_ACCT_PROMOTION_CATEGORY')
18 - access("ACCT_PROMO_HDR"."ROW_ID"="ACCT_TITLE_FORMAT"."PAR_SRC_ID")
19 - filter("ACCT_PROMO_SKU"."PROD_ID" IS NOT NULL AND
"ACCT_PROMO_SKU"."SUB_TYPE"='PLAN_ACCOUNT_PROMOTION_PRODUCT')
20 - access("ACCT_TITLE_FORMAT"."ROW_ID"="ACCT_PROMO_SKU"."PAR_SRC_ID")
22 - access("ACCT_PROMO_SKU"."BU_ID"="SKU_ORG"."ROW_ID")
23 - access("ACCT_PROMO_SKU"."ROW_ID"="ACCT_PROMO_SKUX"."PAR_ROW_ID"(+))
24 - access("ACCT_PROMO_SKU"."PROD_ID"="PROD"."ROW_ID")
25 - filter("PROD"."X_PROD_MATERIAL_NUM" IS NOT NULL AND
"PROD"."X_PROD_MATERIAL_NUM"="PROMO_ACTUAL"."MATERIAL_NUMBER" AND
"PROD"."X_PROD_SALES_ORG"="PROMO_ACTUAL"."SALES_ORG")
55 rows selected.
thanksHi,
the plan you posted has the cost of 2300, i.e. 2300 single-block reads or equivalent number f multi-block reads. Even if none of the blocks is found in cache, 2300 reas shouldn't take more than a couple of minutes, beacause for most of the hard drives available today a disk read is typically within 5-10 ms.
This means that if there is a problem, we will never find out about it by looking in the plan. And it's quite likely that there is, in fact, a problem, because the plan contains a bunch of nested joins, and the cost of each nested join is directly proportional to the cardinality of the previous nested loop. I.e. it suffices to make one bad mistake in estimating the number of rows coming fom one of the nested rows to screw up the entire plan and get all remaining estimates (including the total cost of the query) completely wrong.
In order for us to be able to tell more, we need to see the plan with rowsource statistics, and please don't forget to use tags to preserve formatting (use the preview tab to make sure the posted plan is actually readable).
Best regards,
Nikolay -
All,
I am new to using Query Builder, but I found a tutorial at:
http://otn.oracle.com/products/forms/htdocs/d2k/qb/qb1.htm
When I got to the last slide, it make reference to the "Query Builder Online Help", but I cannot find it. Can anyone help?Hi,
http://www.oracle.com/technology/products/database/application_express/index.html
http://www.oracle.com/technology/products/database/application_express/html/doc.html
Good Reading,
Sim -
Required help for Identifying diff. items in file content conversion.
Hi All,
I've to use a file content conversion parameters for a .txt file in which there are two objects. One is a header and the other is a item detail.
How do we get or mark the difference between both so that XI recognizes the particular line is a Header and the other is a Item detail
Thanks in Advance.
Regards,
Sree.Hi
Make use of a field which is common to header and item line which will always hold different values for header and item. Or otherwise if possible, add an extra field in the header and item lines, say 'Key' and use it in the 'Key Field Name' parameter in the adapter configuration. See this for details - [File Content Conversion for Complex Structures|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/].
Regards,
Riyaz -
I have Table1
ID -- Key -- Name -- City
1--R1--abc--xyz
2--R1--abc--xyz
3--R1--pqr--xyz
4--R1--abc--xyz
5--R1--abc--stp
6--R2--abc1--xyz1
7--R2--abc1--xyz1
8--R2--pqr1--xyz1
9--R2--abc1--xyz1
10--R2--abc1--stp1
I want to get result - Max(ID) where Key + Name + City is same for all rows. there should be one max per key
and result like -
Key-- MaxID
R1--4
R2--9
Edited by: 871447 on Oct 19, 2011 1:54 PM
Edited by: 871447 on Oct 19, 2011 1:56 PMMaybe (NOT TESTED!)
select key,max_id
from (select key,name,city,max(id) max_id,count(*) cnt
from table1
group by key,name,city
where cnt > 1Regards
Etbin -
Require Help on using Roll Up in Query
I have a list of records like:
COL1 COL2 COL3 COL4 COL5 COL6 COL7
ABCGENCY GBP 670 123 6/20/2008 7/21/2008 0162101
BBAGENCY USD 108 347 9/26/2008 5/11/2008 0722102
BBAGENCY EUR 630 999 1/14/2008 2/27/2008 0763104
ABCGENCY THB 400 697 4/12/2008 7/14/2008 0762409
Now, my requirement is, i need to write a query to return the sum of COL5 for the combination of COL1 and COL2. My Output records are suppose to be as follows:
COL1 COL2 COL3 COL4 COL5 COL6 COL7
ABCGENCY GBP 670 123 6/20/2008 7/21/2008 0162101
ABCGENCY THB 400 697 4/12/2008 7/14/2008 0762409
820
BBAGENCY USD 108 347 9/26/2008 5/11/2008 0722102
BBAGENCY EUR 630 999 1/14/2008 2/27/2008 0763104
1346
Friends, Please do help me in framing the query for the above.I don't require the first query and union.
I need -- something as u mentioned
select col1,null,null,sum(col4),null,null,null from tab t
group by col1 ...
But in my query i have all the other columns also with values.
Hence i am unable to group by col1 with sum(col4) alone...rather i have been forced to bring all the other columns used in the select statement to group by clause which is not resulting with my expected output.
Maybe you are looking for
-
Lion and Mountain Lion and Snow Leopard, oh my!
My iMac does not support OS X Mountain Lion, but it does support Lion; is there anyway to upgrade to Lion? In the app store I can't find a way to download Lion now that Mountain Lion is available. Currently running Snow Leopard. Want Lion so that
-
Should I use frames or what?
Here is my dilema. I'm working on a pretty big site. The site has about 8 sections each which have about 10 subsections. I basically created 8 pages total for all of the subsections but I don't want to have to create hundreds of pages for all the sub
-
I have a client that ftp'ed a file to me and when I opened it up in Final cut the sequence opened asMpeg 4. When I started editing I found that every transition or manual fade I applied introduces a shift or glitch. Any suggestions would be great. I
-
Hi I have an iMac with an i7 processor (late 2012) and a Mac Book Air (Mid 2012) both running Yosemite and up to date. I can air drop files from the Air to the iMac but not the other way round - the Air isn't seen on the iMac (in Air drop)for some r
-
Can't download TV series...getting error messages.
I purchased TV series from itunes in HD and two episodes will not download...I get errors. I think it is because I purchased the series in HD. I have tried deleting the entire series and reloading it but this caused my computer to freeze. I would li