Please find this query very urgent
Query-->select value from mytable where value is not null
union all
select value from mytable where value is null
Ex: table name::mytable
In this table i have one column called 'value' and this column values shold be like this
12
null
13
null
11
null
....i executed above query the result will be like this
12
13
11
null
null
null
the above query executes on the table it's effect only one column result
but i need multiple columns to be effected same as above one only....Anyone please help me on it and give the query.
I have a table..MyTable(value number(10))
select * from Mytable;value
12
null
13
null
11
null
This is the table i have and the records i have...... and i need output like this
value
12
13
11
null
null
null ..............>ike this i need output for this i use this query i.e
Query-->select value from mytable where value is not null
union all
select value from mytable where value is null
------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
MyTable2(value1 number(10),value2 number(10))
select * fromMyTable2value1 value2
111 null
null 201
112 null
null 200
110 null
this is the table i have......... and i need output like below
value1 value2
111 201
112 200
110 null
null null
null null
NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that
Similar Messages
-
I always change my password and with this particular one I somehow managed to forget it, I have gone completely blank and I can't remember it. I dont want to restore my phone because I don't want to delete my photos and my songs in itube....PLEASE HELP THIS IS VERY URGENT
iTunes
If you've synced your device with iTunes, you can restore your device.
Connect the device to the computer you normally sync with.
Open iTunes. If iTunes asks you to enter your passcode or asks you to allow access, try another computer that you've synced with. Or use recovery mode. (Click the link to be taken to the steps.)
iTunes will automatically sync your device and create a backup. If it doesn't, sync the device with iTunes.
After the sync is complete, restore your device.
I -
Please i need help very urgent !!! after deleting my exchange account because the company changed the password , I lost 150 200 contacts and i need to get them back very soon ! i never backed up on itunes ..please help
No. The contacts are "owned" by the Exchange server.
The Exchange server is owned by the company.
Everything on the Exchange server is owned by the company.
If you quit or were terminated, and your access to the system has been revoked, then there is nothing you and do at this point. Once you deleted the account from your phone, all of the associated data was deleted.
NEVER store personal information on company systems. -
Is it possible to edit multiple images description, time, title, with new OSX Photos? I find very useful this option in Iphoto
why? i find this opportunity very useful, there is an alternative way?
-
Pls help me , this is very urgent
I have a column called description with values as follows
Admin Support
Admin Support
Admin Support
Air Support
Cable - Disaster Response
Cable - Operational Support
Cable - PMPP (Preparedness)
Cable - Program Support
Capacity Building
Capacity Building
Chemical, Biological, Radiological, & Nuclear
Commodity Procurement Contract
Communications
Computer Support
Contract Services (warehousing)
Coordination
Coordination
Disaster Assistance Response Program
I have another column in this table for which i have to update with the sequence nos. The update should happen in such a way that if the description is same then i have update with sequence.currval and if the description is different then i have to update with sequence.nextval for each row as follows
Admin Support----- 1
Admin Support----- 1
Admin Support----- 1
Air Support----- 2
Cable - Disaster Response----- 3
Cable - Operational Support----- 4
Cable - PMPP (Preparedness)----- 5
Cable - Program Support----- 6
Capacity Building----- 7
Capacity Building----- 7
Chemical, Biological, Radiological----- 8
Commodity Procurement Contract----- 9
Communications----- 10
Computer Support----- 11
Contract Services----- 12
Coordination----- 13
Coordination----- 13
Disaster Assistance Response----- 14
Pls help me how do i do this, this is very urgent
Thanks
VinodIf you want your sequence to start from 1, you can eliminate creating a special sqeuence for this, you can do it using ROWNUM in SQL,update your_table a
set (a.description, a.col1)
= (select c.description, c.rn from
(select b.description, rownum rn from
(select distinct description from your_table order by description) b) c
where c.description = a.description);P.S Just an alternative.
Thx,
SriDHAR -
Please show this query, data not showing why?
I created a report and write following query,it was working well since last 4 months but today automaticly not showing data I can undertstand why?
Becuase I didnt make any changes in this query.
Please help me
Urgent
SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
FROM BUYER, MERCH_ORDER
WHERE MERCH_ORDER.CANCEL IS NULL
AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
and merch_order.orderno not in
(select export_order1.orderno from export_order1)
ORDER BY MERCH_ORDER.ORDERNO
there is no any error and msg header and footer print.Maybe , the query in "NOT IN" clause select export_order1.orderno from export_order1
return the same rows as the following portion return....
SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
FROM BUYER, MERCH_ORDER
WHERE MERCH_ORDER.CANCEL IS NULL
AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
OR
there are no rows which conform to the joining condition between the two tables BUYER and MERCH_ORDER ....
Regards,
Simon -
Please see this query, not showing data Why?
I created a report and write following query,it was working well since last 4 months but today automaticly not showing data I can undertstand why?
Becuase I didnt make any changes in this query.
Please help me
Urgent
SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
FROM BUYER, MERCH_ORDER
WHERE MERCH_ORDER.CANCEL IS NULL
AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
and merch_order.orderno not in
(select export_order1.orderno from export_order1)
ORDER BY MERCH_ORDER.ORDERNOWhere "first table" is merch_order and "second table" is export_order1?
How many distinct orders are in each table?
Are there any NULL order numbers in either table?
I'd put money on the fact that if commenting out a clause causes a number of rows to be returned, that clause is filtering out all the rows. You'll need to go through your data to figure out why the NOT IN clause is filtering out all your rows.
Justin -
Please tune this query.
Hi Experts,
My below query is taking long time.
[code]SELECT FAX_LIST.*
FROM (SELECT /*+ use_nl(fax, src) */
ROW_NUMBER () OVER (ORDER BY fax.ID ASC NULLS FIRST) RN,
fax.ACCOUNT_TYPE,
fax.BU_FILE_LOCATION,
fax.COUNT_PAGES_RECEIVED,
NVL (fax.CUSTOMER_NAME, fax.SENDER_NAME) AS CUSTOMER_NAME,
fax.FAX_SOURCE,
fax.CUSTOMER_NUMBER,
fax.CUSTOMER_OMEGA_NUMBER,
fax.GENIFAX_RECIPIENT_ID,
fax.ID AS FAX_ID,
fax.DATE_RECEIVED AS FAX_RECEIVED,
fax.IS_LOCKED,
fax.LOCKED_BY,
fax.ORIGINATOR_CSI,
fax.MARGIN,
fax.PAYMENT_TYPE,
fax.PRIORITY_CODE,
fax.PRIORITY_VALUE,
FROM_TZ (fax.DATE_RECEIVED, 'UTC')
AT TIME ZONE fax.LOCAL_TZ_NAME
AS DATE_RECEIVED,
fax.SALES_PERSON,
fax.SENDER_EMAIL,
fax.SENDER_NAME,
fax.SUBJECT,
fax.WORKGROUP_ID,
fax.LOCKED_TIME,
src.DESCRIPTION,
src.FAX_NUMBER,
src.WORKFLOW_ID,
fax.CREATED_BY,
fax.CREATED_DATE,
fax.UPDATE_DATE,
fax.UPDATED_BY,
fax.RESERVED_BY,
fax.PRICE_TO_ORDER,
fax.SKU_COUNT_TO_ORDER,
NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_BY,
CASE
WHEN fax.LAST_TRANSITION_ID IS NULL
AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
THEN
'ORL FEEDER'
ELSE
'Admin'
END)
AS LAST_USER,
FROM_TZ (
NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_DATE,
fax.DATE_RECEIVED),
'UTC')
AT TIME ZONE fax.LOCAL_TZ_NAME
AS MOVE_DATETIME,
NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).REASON,
'Reroute')
AS MOVE_REASON,
NVL (
(SELECT fw.DESCRIPTION
FROM ORL.WORKGROUP_TRANSITION wt, ORL.WORKGROUP fw
WHERE wt.ID =
ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).WORKGROUP_TRANSITION_ID
AND fw.ID = wt.CURRENT_WORKGROUP_ID),
CASE
WHEN fax.LAST_TRANSITION_ID IS NULL
AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
THEN
'ORL FEEDER STAGING'
ELSE
'N/A'
END)
AS OLD_STATUS,
(SELECT MAX (PURCHASE_ORDER_NUMBER)
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID)
AS MAXPO,
(SELECT CASE COUNT (PURCHASE_ORDER_NUMBER)
WHEN 0 THEN NULL
ELSE COUNT (PURCHASE_ORDER_NUMBER)
END
AS POCOUNT
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID)
AS POCOUNT,
(SELECT SUM (VALUE) AS ORDER_VALUE
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID)
AS ORDER_VALUE,
fax.SALESPERSON_NAME,
fax.GROUP_NAME,
fax.ROLE_NAME,
fax.EMAIL,
fax.SALES_CHANNEL
FROM (SELECT fax.*,
map.ORACLE_TZ_NAME AS LOCAL_TZ_NAME,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALESPERSON_NAME
AS SALESPERSON_NAME,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).GROUP_NAME
AS GROUP_NAME,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).ROLE_NAME
AS ROLE_NAME,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).EMAIL
AS EMAIL,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALES_CHANNEL
AS SALES_CHANNEL
FROM APPS_GLOBAL.GLOBAL_BU_MAPPING map,
(SELECT *
FROM ORL.FAX_HEADER FH
WHERE FH.WORKGROUP_ID = 262) fax
WHERE map.GEDIS = 'Y'
AND map.BU_ID = (SELECT BUID
FROM ORL.WORKGROUP
WHERE ID = fax.WORKGROUP_ID)
AND ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALESPERSON_NAME =
'A_CARRICK') fax,
(SELECT *
FROM ORL.FAX_SOURCE FS
WHERE FS.WORKFLOW_ID IN
(SELECT /*+ CARDINALITY(t, 1) */
TO_NUMBER (
COLUMN_VALUE)
AS COLUMN_VALUE
FROM TABLE (
SplitClob ('1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98', ',')) t)) src
WHERE src.ID(+) = fax.FAX_SOURCE) FAX_LIST
WHERE RN BETWEEN 1 AND 100
ORDER BY RN ASC;[/code]
In my query the following three functions are using.
ORL.GET_FTH_WTR
ORL.GET_SALESPERSON
APPS_GLOBAL.SplitClob
[code]CREATE OR REPLACE FUNCTION ORL.GET_FTH_WTR(p_LAST_TRANSITION_ID NUMBER)
RETURN ORL.FTH_WTR_T
DETERMINISTIC
IS
v_REASON nvarchar2(1024 char);
v_WORKGROUP_TRANSITION_ID number;
v_CHANGED_BY nvarchar2(64 char);
v_CHANGED_DATE timestamp(6);
BEGIN
SELECT
WTR.REASON,
wtr.WORKGROUP_TRANSITION_ID,
fth.CHANGED_BY,
fth.CHANGED_DATE
INTO
v_REASON,
v_WORKGROUP_TRANSITION_ID,
v_CHANGED_BY,
v_CHANGED_DATE
FROM
ORL.FAX_TRANSITION_HISTORY fth,
ORL.WORKGROUP_TRANSITION_REASON wtr
WHERE
fth.ID = p_LAST_TRANSITION_ID
AND wtr.ID(+) = fth.TRANSITION_REASON_ID;
RETURN ORL.FTH_WTR_T(v_CHANGED_BY, v_CHANGED_DATE, v_REASON, v_WORKGROUP_TRANSITION_ID);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN ORL.FTH_WTR_T(NULL, NULL, NULL, NULL);
END GET_FTH_WTR;
CREATE OR REPLACE function ORL.GET_SALESPERSON(ORG_ID number, SALESPERSON_ID number)
return ORL.SALESPERSON_T
deterministic
is
apps_bu varchar2(30);
salesperson_name varchar2(150 char);
email varchar2(70 char);
sales_channel varchar2(60 char);
role_name varchar2(60 char);
group_name varchar2(60 char);
begin
select OWNER_NAME into apps_bu
from APPS_GLOBAL.GLOBAL_BU_MAPPING
where ORG_ID = GET_SALESPERSON.ORG_ID;
execute immediate
replace('
select SALESPERSON_NAME
, EMAIL
, SALES_CHANNEL
, ROLE_NAME
, GROUP_NAME
from APPS_**.ORL_ACTIVE_SALESPERSON
where SALESPERSON_ID = :1
and rownum = 1
', 'APPS_**', apps_bu)
into salesperson_name, email, sales_channel, role_name, group_name
using SALESPERSON_ID;
return SALESPERSON_T(ORG_ID, SALESPERSON_ID, salesperson_name, email, sales_channel, role_name, group_name);
exception
when no_data_found then
return SALESPERSON_T(null, null, null, null, null, null, null);
end GET_SALESPERSON;
CREATE OR REPLACE function APPS_GLOBAL.SplitClob
p_clob clob
, p_delimiter varchar2 := ','
return StringTable
deterministic
pipelined
as
v_current_pos pls_integer := 1;
v_delimiter_pos pls_integer;
begin
if (p_clob is not NULL) and (p_delimiter is not NULL) then
while v_current_pos <= length(p_clob) loop
v_delimiter_pos := instr(p_clob, p_delimiter, v_current_pos);
if v_delimiter_pos < 1 then -- no more delimiters
v_delimiter_pos := length(p_clob) + 1;
end if;
pipe row( to_char( substr(p_clob,
v_current_pos,
v_delimiter_pos - v_current_pos) ) );
v_current_pos := v_delimiter_pos + length(p_delimiter);
end loop;
end if;
end SplitClob;
CREATE OR REPLACE TYPE SALESPERSON_T AS OBJECT
SALESPERSON_ID number(15)
, SALESPERSON_NUMBER varchar2(150 char)
, FIRST_NAME varchar2(20 char)
, LAST_NAME varchar2(40 char)
, SALES_CHANNEL varchar2(60 char)
, ORG_ID number(15)
, USER_NAME varchar2(61 char)
, EFFECTIVE_START_DATE date
, EFFECTIVE_END_DATE date
, STATUS_FLAG varchar2(1 char)
, EMAIL varchar2(70 char)
, WORK_TELEPHONE varchar2(60 char)
, MANAGERS_NAME varchar2(50 char)
, FAX_NO varchar2(60 char)
, SALESPERSON_NAME varchar2(30 char)
, TERRITORY varchar2(40 char)
, FO_LOGON varchar2(150 char)
, BO_LOGON varchar2(150 char)
, SUB_CHANNEL varchar2(25 char)
, BUSINESS_SEGMENT varchar2(3 char)
, DISCOUNT_NAME varchar2(30 char)
, RESPONSIBILITY_ID number
, RESPONSIBILITY_KEY varchar2(30 char)
CREATE OR REPLACE TYPE STRINGTABLE as table of varchar2(4000);[/code]
The total number of records in each table.
[code]SELECT COUNT(*) FROM ORL.FAX_HEADER FH --4397829
SELECT COUNT(*) FROM APPS_GLOBAL.GLOBAL_BU_MAPPING map --31
SELECT COUNT(*) FROM ORL.WORKGROUP_TRANSITION --6735
SELECT COUNT(*) FROM ORL.WORKGROUP fw --1495
SELECT COUNT(*) FROM ORL.FAX_OFFER_DETAIL --5904039
SELECT COUNT(*) FROM ORL.FAX_SOURCE--2368 --2457[/code]
Indexes on the columns.
[code]ORL.WORKGROUP_TRANSITION(ID),
ORL.WORKGROUP(ID),
ORL.FAX_OFFER_DETAIL(FAX_ID),
ORL.FAX_HEADER(WORKGROUP_ID).[/code]
Please help me to tune this query.
Thanks in advance.Hi,
Thanks for your reply.
For split the numbers into different rows , we are sending randomly.
It's not constant numbers.We have used bind variables.
For testing purpose I have hard coded the values.
How to do this split without using user defined function.
I am sending the actual query along with execution plan without any hints.
[code]SELECT FAX_LIST.*
FROM (SELECT ROW_NUMBER () OVER (ORDER BY fax.ID ASC) RN,
fax.ACCOUNT_TYPE,
fax.BU_FILE_LOCATION,
fax.COUNT_PAGES_RECEIVED,
NVL (fax.CUSTOMER_NAME, fax.SENDER_NAME) AS CUSTOMER_NAME,
fax.FAX_SOURCE,
fax.CUSTOMER_NUMBER,
fax.CUSTOMER_OMEGA_NUMBER,
fax.GENIFAX_RECIPIENT_ID,
fax.ID AS FAX_ID,
fax.DATE_RECEIVED AS FAX_RECEIVED,
fax.IS_LOCKED,
fax.LOCKED_BY,
fax.ORIGINATOR_CSI,
fax.MARGIN,
fax.PAYMENT_TYPE,
fax.PRIORITY_CODE,
fax.PRIORITY_VALUE,
FROM_TZ (fax.DATE_RECEIVED, 'UTC') AT TIME ZONE map.ORACLE_TZ_NAME AS DATE_RECEIVED,
fax.SALES_PERSON,
fax.SENDER_EMAIL,
fax.SENDER_NAME,
fax.SUBJECT,
fax.WORKGROUP_ID,
fax.LOCKED_TIME,
src.DESCRIPTION,
src.FAX_NUMBER,
src.WORKFLOW_ID,
fax.CREATED_BY,
fax.CREATED_DATE,
fax.UPDATE_DATE,
fax.UPDATED_BY,
fax.RESERVED_BY,
fax.PRICE_TO_ORDER,
fax.SKU_COUNT_TO_ORDER,
NVL (
ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_BY,
CASE
WHEN fax.LAST_TRANSITION_ID IS NULL
AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
THEN
'ORL FEEDER'
ELSE
'Admin'
END
AS LAST_USER,
FROM_TZ (NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).CHANGED_DATE,fax.DATE_RECEIVED),'UTC')
AT TIME ZONE map.ORACLE_TZ_NAME AS MOVE_DATETIME,
NVL (ORL.GET_FTH_WTR (fax.LAST_TRANSITION_ID).REASON,'Reroute')AS MOVE_REASON,
NVL ((SELECT fw.DESCRIPTION
FROM ORL.WORKGROUP_TRANSITION wt, ORL.WORKGROUP fw
WHERE wt.ID =
ORL.GET_FTH_WTR (
fax.LAST_TRANSITION_ID
).WORKGROUP_TRANSITION_ID
AND fw.ID = wt.CURRENT_WORKGROUP_ID),
CASE
WHEN fax.LAST_TRANSITION_ID IS NULL
AND fax.GENIFAX_RECIPIENT_ID IS NOT NULL
THEN
'ORL FEEDER STAGING'
ELSE
'N/A'
END
AS OLD_STATUS,
(SELECT MAX (PURCHASE_ORDER_NUMBER)
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID)
AS MAXPO,
(SELECT CASE COUNT (PURCHASE_ORDER_NUMBER)
WHEN 0 THEN NULL
ELSE COUNT (PURCHASE_ORDER_NUMBER)
END
AS POCOUNT
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID)
AS POCOUNT,
(SELECT SUM (VALUE) AS ORDER_VALUE
FROM ORL.FAX_OFFER_DETAIL
WHERE FAX_ID = fax.ID) AS ORDER_VALUE,
ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).SALESPERSON_NAME AS SALESPERSON_NAME,
ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).GROUP_NAME AS GROUP_NAME,
ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).ROLE_NAME AS ROLE_NAME,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).EMAIL AS EMAIL,
ORL.GET_SALESPERSON (map.ORG_ID, fax.SALES_PERSON).SALES_CHANNEL AS SALES_CHANNEL
FROM ORL.FAX_HEADER fax,
APPS_GLOBAL.GLOBAL_BU_MAPPING map,
ORL.FAX_SOURCE src
WHERE fax.WORKGROUP_ID = :WORKGROUP_ID
AND map.GEDIS = 'Y'
AND map.BU_ID = (SELECT BUID
FROM ORL.WORKGROUP
WHERE ID = fax.WORKGROUP_ID)
AND ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON).GROUP_NAME =:SALES_TEAM
AND ORL.GET_SALESPERSON (map.ORG_ID,fax.SALES_PERSON
).SALESPERSON_NAME = :SALESPERSON_NAME
AND src.WORKFLOW_ID IN
(SELECT TO_NUMBER (COLUMN_VALUE) AS COLUMN_VALUE
FROM table(SplitClob (:WORKFLOW_ID,:WORKFLOW_ID_delim)) t)
AND src.ID(+) = fax.FAX_SOURCE) FAX_LIST
WHERE RN BETWEEN 1 AND 100;
Execution Plan
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
| 0 | SELECT STATEMENT | | 2 | 12092 | 88923 (1)|
| 1 | NESTED LOOPS | | 1 | 38 | 3 (0)|
| 2 | TABLE ACCESS BY INDEX ROWID | WORKGROUP_TRANSITION | 1 | 9 | 2 (0)|
| 3 | INDEX UNIQUE SCAN | PK_WORKGROUP_TRANSITION | 1 | | 1 (0)|
| 4 | TABLE ACCESS BY INDEX ROWID | WORKGROUP | 1482 | 42978 | 1 (0)|
| 5 | INDEX UNIQUE SCAN | PK_WORKGROUP | 1 | | 0 (0)|
| 6 | SORT AGGREGATE | | 1 | 16 | |
| 7 | TABLE ACCESS BY INDEX ROWID | FAX_OFFER_DETAIL | 1 | 16 | 5 (0)|
| 8 | INDEX RANGE SCAN | FAX_OFFER_DETAIL_IDX1 | 1 | | 3 (0)|
| 9 | SORT AGGREGATE | | 1 | 16 | |
| 10 | TABLE ACCESS BY INDEX ROWID | FAX_OFFER_DETAIL | 1 | 16 | 5 (0)|
| 11 | INDEX RANGE SCAN | FAX_OFFER_DETAIL_IDX1 | 1 | | 3 (0)|
| 12 | SORT AGGREGATE | | 1 | 11 | |
| 13 | TABLE ACCESS BY INDEX ROWID | FAX_OFFER_DETAIL | 1 | 11 | 5 (0)|
| 14 | INDEX RANGE SCAN | FAX_OFFER_DETAIL_IDX1 | 1 | | 3 (0)|
| 15 | VIEW | | 2 | 12092 | 88923 (1)|
| 16 | WINDOW SORT PUSHED RANK | | 2 | 1378 | 88923 (1)|
| 17 | NESTED LOOPS | | | | |
| 18 | NESTED LOOPS | | 2 | 1378 | 88920 (1)|
| 19 | NESTED LOOPS | | 18420 | 11M| 70490 (1)|
| 20 | HASH JOIN RIGHT SEMI | | 69 | 3657 | 49 (3)|
| 21 | COLLECTION ITERATOR PICKLER FETCH| SPLITCLOB | 8168 | 16336 | 29 (0)|
| 22 | TABLE ACCESS FULL | FAX_SOURCE | 2409 | 119K| 19 (0)|
| 23 | TABLE ACCESS BY INDEX ROWID | FAX_HEADER | 268 | 160K| 2854 (1)|
| 24 | INDEX RANGE SCAN | FAX_HEADER_FS_IDX | 4345 | | 7 (0)|
| 25 | INDEX RANGE SCAN | GLOBAL_BU_MAPPING_BUID | 1 | | 0 (0)|
| 26 | TABLE ACCESS BY INDEX ROWID | WORKGROUP | 1 | 8 | 2 (0)|
| 27 | INDEX UNIQUE SCAN | PK_WORKGROUP | 1 | | 1 (0)|
| 28 | TABLE ACCESS BY INDEX ROWID | GLOBAL_BU_MAPPING | 1 | 24 | 1 (0)|
Note
- 'PLAN_TABLE' is old version
Statistics
894400 recursive calls
60 db block gets
7402741 consistent gets
0 physical reads
0 redo size
46309 bytes sent via SQL*Net to client
430 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
848304 sorts (memory)
0 sorts (disk)
100 rows processed[/code]
Please help me.
Thanks in advance. -
could u plz explain how to populate the data into the final internal table in this program.
i need how to add this all select statement into one final internal table
plz provide me
i am using ALVgrid repors
could u plz explain clearly with comments
very urgent
TABLES: eban, "Purchase Requisition
ekko, "Purchasing Document Header
mereq3328, "Purchase Requisition: Contact
cdpos, "Change document items
cdhdr, "Change document header
dd04t. "R/3 DD: Data element texts
TYPE-POOLS: slis.
TYPES :
*declaration of type for internal table to be passed in ALV report as
*internal table.
BEGIN OF typ_req1,
statu TYPE eban-statu, "Processing status of purchase requisition
banpr TYPE eban-banpr, "Requisition Processing State
bsart TYPE eban-bsart, "Purchase requisition document type
banfn TYPE eban-banfn, "Purchase requisition number
bnfpo TYPE eban-bnfpo, "Item number of purchase requisition
ebeln TYPE eban-ebeln, "Purchase order number
ebelp TYPE eban-ebelp, "Purchase order item number
matnr TYPE eban-matnr, "Material Number
txz01 TYPE eban-txz01, "Short text
creator_name TYPE mereq3328-creator_name, "Creator
afnam TYPE eban-afnam, "Name of requisitioner/requester
lifnr TYPE eban-lifnr, "Desired vendor
flief TYPE eban-flief, "Fixed Vendor
ekgrp TYPE ekko-ekgrp, "Purchasing Group
tabkey TYPE cdpos-tabkey, "Item Number
ddtext TYPE dd04t-ddtext, "Short Text
chngind TYPE cdpos-chngind, "Action
value_new TYPE cdpos-value_new, "New Value
value_old TYPE cdpos-value_old, "Old Value
username TYPE cdhdr-username, "Name
udate TYPE cdhdr-udate, "Date
utime TYPE cdhdr-utime, "Time
changenr TYPE cdhdr-changenr, "Doc Number
tcod TYPE cdhdr-tcode, "Transaction Code
END OF typ_req1,
Type declaration for EBAN table fields
BEGIN OF typ_eban,
statu TYPE eban-statu, "Processing status of purchase requisition
banpr TYPE eban-banpr, "Requisition Processing State
bsart TYPE eban-bsart, "Purchase requisition document type
banfn TYPE eban-banfn, "Purchase requisition number
bnfpo TYPE eban-bnfpo, "Item number of purchase requisition
ebeln TYPE eban-ebeln, "Purchase order number
ebelp TYPE eban-ebelp, "Purchase order item number
matnr TYPE eban-matnr, "Material Number
txz01 TYPE eban-txz01, "Short text
afnam TYPE eban-afnam, "Name of requisitioner/requester
lifnr TYPE eban-lifnr, "Desired vendor
flief TYPE eban-flief, "Fixed Vendor
END OF typ_eban,
Type declaration for ekko table fields
BEGIN OF typ_ekko,
ekgrp TYPE ekko-ekgrp, "Purchasing Group
END OF typ_ekko,
Type declaration for cdpos table fields
BEGIN OF typ_cdpos,
fname TYPE cdpos-fname,
changenr TYPE cdpos-changenr, "Doc Number
objectclas TYPE cdpos-objectclas, "Object class
objectid TYPE cdpos-objectid, "Object value
tabkey TYPE cdpos-tabkey, "Item Number
chngind TYPE cdpos-chngind, "Action
value_new TYPE cdpos-value_new, "New Value
value_old TYPE cdpos-value_old, "Old Value
CHNGIND type cdpos-CHNGIND
END OF typ_cdpos,
Type declaration for cdhdr table fields
BEGIN OF typ_cdhdr,
objectclas TYPE cdhdr-objectclas, "Object class
objectid TYPE cdhdr-objectid, "Object value
username TYPE cdhdr-username, "Name
udate TYPE cdhdr-udate, "Date
utime TYPE cdhdr-utime, "Time
changenr TYPE cdhdr-changenr, "Doc Number
tcod TYPE cdhdr-tcode, "Transaction Code
change_ind TYPE cdhdr-change_ind,
objectid1(10) TYPE c,
END OF typ_cdhdr,
Type declaration for dd04t table fields
BEGIN OF typ_dd04t,
ddtext TYPE dd04t-ddtext, "Short Text
END OF typ_dd04t,
Type declaration for dd04t table fields
BEGIN OF typ_mereq3328,
creator_name TYPE mereq3328-creator_name, "Creator
END OF typ_mereq3328.
*& delcaratilon of internal table *
DATA:
Internal table for final internal table
it_req1 TYPE STANDARD TABLE OF typ_req1,
Internal table for eban table
it_eban TYPE STANDARD TABLE OF typ_eban,
Internal table for ekko table
it_ekko TYPE STANDARD TABLE OF typ_ekko,
Internal table for cdpos table
it_cdpos TYPE STANDARD TABLE OF typ_cdpos,
Internal table for cdhdr table
it_cdhdr TYPE STANDARD TABLE OF typ_cdhdr,
Internal table for cdhdr1 table
it_dd04t TYPE STANDARD TABLE OF typ_dd04t,
Internal table for mereq3328 table
it_mereq3328 TYPE STANDARD TABLE OF typ_mereq3328,
Internal table for ALV Field Catalog
it_fieldcat_alv TYPE slis_t_fieldcat_alv,
Internal table for ALV Event
it_events TYPE slis_t_event.
*& Declaration of Work Area
work area for final internal table
wa_req1 TYPE typ_req1,
work area for eban table
wa_eban TYPE typ_eban,
work area for ekko table
wa_ekko TYPE typ_ekko,
work area for cdpos table
wa_cdpos TYPE typ_cdpos,
work area for cdhdr table
wa_cdhdr TYPE typ_cdhdr,
work area for dd04t table
wa_dd04t TYPE typ_dd04t,
work area for mereq3328 table
wa_mereq3328 TYPE typ_mereq3328.
Declaration of work area for Field Catalog
wa_fieldcat TYPE slis_fieldcat_alv,
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_bsart FOR eban-bsart OBLIGATORY
DEFAULT 'znb1' TO 'znb2', "Purchase requisition document type
s_banfn FOR eban-banfn, "Req Number
s_bnfpo FOR eban-bnfpo, "Req Item Number
s_ebeln FOR eban-ebeln, "Purchase Order Number
s_ebelp FOR eban-ebelp, "Purchase Order Item Number
s_matnr FOR eban-matnr. "Material Number
PARAMETER: p_txz01 TYPE eban-txz01. "Short text
SELECT-OPTIONS: s_creat FOR mereq3328-creator_name, "Creator
s_afnam FOR eban-afnam, "Requester
s_lifnr FOR eban-lifnr, "Desired vendor
s_flief FOR eban-flief. "Fixed Vendor
SELECTION-SCREEN END OF BLOCK b.
SELECT objectclas
objectid
changenr
username
udate
utime
tcode
change_ind FROM cdhdr
INTO TABLE it_cdhdr
WHERE objectclas = 'BANF'
AND udate = sy-datum .
SELECT objectclas
objectid
changenr
chngind
tabkey
value_new
value_old
FROM cdpos INTO TABLE it_cdpos
FOR ALL ENTRIES IN it_cdhdr
WHERE changenr EQ it_cdhdr-changenr AND
chngind EQ it_cdhdr-change_ind AND
objectclas EQ it_cdhdr-objectclas AND
objectid EQ it_cdhdr-objectid.
IF NOT it_cdhdr[] IS INITIAL.
SELECT banfn
bnfpo
bsart
statu
afnam
txz01
matnr
lifnr
ebeln
ebelp
banpr
FROM eban INTO TABLE it_eban
WHERE "banfn = it_cdhdr-objectid
banfn IN s_banfn
AND bnfpo IN s_bnfpo
AND bsart IN s_bsart
AND matnr IN s_matnr
AND lifnr IN s_lifnr
AND flief IN s_flief.
ENDIF.
IF NOT it_cdpos[] IS INITIAL.
SELECT rollname
ddtext
FROM dd04t INTO TABLE it_dd04t
FOR ALL ENTRIES IN it_cdpos
WHERE rollname = it_cdpos-fname.hi rajeshreddy,
create one global internal table for the all output fields,
then move all these fields into this global internal table and pass into your gird FM.
i.e. see the below code for reference ,
loop at <itab> into <wa>.
read table <itab1> into <wa1> with key <keyfield> = <wa-field>.
if sy-subrc = 0.
move-correspondig <wa1> to <globalwa>.
move-correspondig <wa> to <globalwa>.
endif.
then read another <itab2> into <wa2> with key <keyfield> = <wa-field>.
if sy-subrc = 0.
move-correspondig <wa2> to <globalwa>.
endif.
endloop.
like this u can move all output fields into one global internal table but u should have relation among all the internal tables.
reward points if helpful,
regards,
seshu. -
Please convert this query to update.
Hi Experts,
Please convert this MERGE statment to UPDATE.
MERGE INTO CUSTOMER_DTLS CDT
USING
SELECT CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
FROM CUSTOMER_DTLS CDT
INNER JOIN REVEN_MAP RMP ON CDT.CDT_ID = RMP.ORG_ID
INNER JOIN SALES_DTLS OST ON RMP.WB_IBU = OST.IBU AND OST.Rep_Code = CDT.CDT_SECSALESREP
WHERE CDT.PRODUCT_SEC = 'M'
AND CDT.CDT_ID = 600
) SALES_QUERY
ON(
CDT.CDT_ID = SALES_QUERY.CDT_ID
AND CDT.CDT_ITEMREQ_NO = SALES_QUERY.CDT_ITEMREQ_NO
AND CDT.CDT_UNIT_NO = SALES_QUERY.CDT_UNIT_NO
AND CDT.CDT_UPDATE_DT = SALES_QUERY.CDT_UPDATE_DT
AND CDT.PRODUCT_SEC = 'M'
WHEN MATCHED THEN
UPDATE SET CDT.CDT_SALES_REP = SALES_QUERY.SalesName,
CDT.CDT_OutSide_SALES_DTLS = SALES_QUERY.Team,
CDT.CDT_OutSide_Team_ID = SALES_QUERY.Team_ID
WHERE CDT.CDT_SALES_REP IS NULL
AND CDT.PRODUCT_SEC = 'M'
AND CDT.CDT_ID = 600;
Please help me.
Thanks.Hi All,
The merge query first doing join and make it as a SALES_QUERY query.
SELECT CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
FROM CUSTOMER_DTLS CDT
INNER JOIN REVEN_MAP RMP ON CDT.CDT_ID = RMP.ORG_ID
INNER JOIN SALES_DTLS OST ON RMP.WB_IBU = OST.IBU AND OST.Rep_Code = CDT.CDT_SECSALESREP
WHERE CDT.PRODUCT_SEC = 'M'
AND CDT.CDT_ID = 600
) SALES_QUERY
On top of it using the result of SALES_QUERY checking the following matching.
ON(
CDT.CDT_ID = SALES_QUERY.CDT_ID
AND CDT.CDT_ITEMREQ_NO = SALES_QUERY.CDT_ITEMREQ_NO
AND CDT.CDT_UNIT_NO = SALES_QUERY.CDT_UNIT_NO
AND CDT.CDT_UPDATE_DT = SALES_QUERY.CDT_UPDATE_DT
AND CDT.PRODUCT_SEC = 'M'
But in your update it's just joining and after that not used any of these values for comparison.
CDT.CDT_ID, CDT.CDT_ITEMREQ_NO, CDT_UNIT_NO, CDT.CDT_UPDATE_DT, OST.SalesName, OST.Team, OST.Team_ID
How this works.
Please explain.
Thanks. -
LSMW Please answer this query Experts
Hi all,
I Know how to use LSMW and upload data . Now I am trying to upload data for xk01 uisng lsmw. SO, the problem is vendor number uses internal assignment here. I don't know wether we use lsmw if lifnr uses internal assignment.Also I need to upload bank details for each vendor which are in a seperate flat file. Guys with real time experience, I think can solve this problem. Please guide me with this.
Regards,
Varun.You already have another post with the same question. Can you please close this one?
-
PLEASE HELP ME OUT WITH THIS REQUIREMENT VERY URGENT
HI TO ALL EXPERTS,
I HAVE AN INTERNAL TABLE IT_EXCEL WITH THREE FIELDS
SUPPOSE
ROW COL VAL
1 1 231
1 2 001
NOW I WANT TO MOVE JUST THAT VAL (COLOUMN)CONTENTS TO ANOTHER INTERNAL TABLE
FOR EX :
DATA : BEGIN OF ITAB OCCURS 0,
VAL1(4),
VAL2(5),
END OF ITAB.
NOW THAT ITAB SHOULD HAVE
VAL1 VAL2
231 001
PLEASE ANYONE EXPALIN HOW TO DO IT?
FULL POINTS FOR CORRECT ANSWERHI PABLO,
IM SENDING THE CODE,
IM HAVE WRITEN A BAPI FOR MATERIAL SAVE
I HAVE GOT THE DATA IN EXCEL FILE.
NOW I WANT TO MOVE THE VALUE COLOUMN OF EXCEL INTERNAL TABLE TO IT_DATA INTERNAL TABLE
REPORT ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
TYPES:BEGIN OF TY_MAT,
MATERIAL(4),
IND_SECTOR(1),
MATL_TYPE(4),
MATL_GROUP(9),
BASE_UOM(3),
BASE_UOM_ISO(3),
PLANT(4),
DEL_FLAG(1),
PUR_GROUP(3),
BASE_QTY(13),
PLANT1(4),
STGE_LOC(4),
MRP_IND(1),
SALES_ORG(4),
DISTR_CHAN(2),
DEL_FLAG1(1),
MIN_ORDER(13),
MAKTX(40),
LANGU(2),
END OF TY_MAT.
DATA: IT_DATA TYPE TABLE OF TY_MAT,
WA_DATA LIKE LINE OF IT_DATA,
WA_DATA1 TYPE TY_MAT.
*DECLARING WORK AREA TO BE PASSED TO THE FUNCTION MODULE.
DATA: BAPI_HEAD LIKE BAPIMATHEAD,
BAPI_CLIENTDATA LIKE BAPI_MARA,
BAPI_CLIENTDATAX LIKE BAPI_MARAX,
BAPI_PLANTDATA LIKE BAPI_MARC,
BAPI_PLANTDATAX LIKE BAPI_MARCX,
BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
BAPI_SALESDATA LIKE BAPI_MVKE,
BAPI_SALESDATAX LIKE BAPI_MVKEX,
BAPI_MAKT LIKE BAPI_MAKT,
BAPI_RETURN LIKE BAPIRET2.
*EXCELAL TABLE TO HOLD THE MATERIAL DESCRIPTION
DATA: BEGIN OF IT_MAKT.
INCLUDE STRUCTURE BAPI_MAKT.
DATA END OF IT_MAKT.
DATA:BEGIN OF IT_RET.
INCLUDE STRUCTURE BAPIRET2.
DATA END OF IT_RET.
*EXCELAL TABLE TO HOLD HEADER DATA
DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*SELECTION-SCREEN ELEMENTS
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY.
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK B1.
*DECLARATION OF EXCELAL TABLE
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
PERFORM F_GET_FILE USING FNAME.
START-OF-SELECTION.
PERFORM F_XLS_ITAB USING FNAME
CHANGING IT_EXCEL.
PERFORM F_MOVE_DATA.
*& Form F_GET_FILE
text*
-->P_FNAME text*
<--P_SY_SUBRC text*
FORM F_GET_FILE USING P_FNAME LIKE FNAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '*
STATIC = ' '*
MASK = ' '*
CHANGING
FILE_NAME = P_FNAME
EXCEPTIONS*
MASK_TOO_LONG = 1*
OTHERS = 2*
IF SY-SUBRC <> 0.
MESSAGE E006(ZHNC).
ENDIF.
ENDFORM. " F_GET_FILE
*& Form F_XLS_ITAB
text*
-->P_FNAME text*
<--P_IT_EXCEL text*
FORM F_XLS_ITAB USING P_FNAME
CHANGING P_IT_EXCEL.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = FNAME
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_EXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.*
ENDIF. -
Tuning the query : Very Urgent
Hi
We have query wich needs tuning.when we are putting REGULAR EXPRESSION query is running fine but whne we put like LIKE stmt it is taking time.Here is the query below.Please help on tuning.
SELECT a.order_number, b.last_update_date,TO_CHAR( b.split_percent,'FM99999.009') SPLIT_PERCENTAGE,
rs.NAME " SALES_PERSON_NAME ", rs.salesrep_number, b.effective_date,
b.creation_date "CREATION_DATE", rt.NAME "TERRITORY_NAME",
rt.segment1 "ERP_CODE", a.booked_date "DATE_BOOKED",
TO_CHAR(ROUND((( (SELECT SUM (ordered_quantity * unit_selling_price)
FROM apps.oe_order_lines_all ol
WHERE ol.header_id = a.header_id)
* b.split_percent
/ 100
) , 2),'FM99999999999999999999.009') order_total ,
(SELECT user_name
FROM fnd_user
WHERE user_id = b.last_updated_by) requested_by,
b.obsolete_date
FROM oe_order_headers_all a,
apps.csm_header_sales_cr_hist b,
jtf_rs_salesreps rs,
ra_territories rt
WHERE 1 = 1
AND a.header_id = b.source_header_id
AND b.territory_id = rt.territory_id
AND b.salesrep_id = rs.salesrep_id
AND b.source_type = 'O'
AND a.order_number IN (
SELECT a.order_number
FROM oe_order_headers_all a,
apps.csm_header_sales_cr_hist b,
jtf_rs_salesreps rs,
ra_territories rt
WHERE 1 = 1
AND a.header_id = b.source_header_id
AND b.territory_id = rt.territory_id
AND b.salesrep_id = rs.salesrep_id
AND b.source_type = 'O'
-- AND b.obsolete_date IS NULL --ommented by andondap as per TD#9648 Changes
AND REGEXP_LIKE ( rs.name , '(svc)|(Muti.*Y)|(Multi.*Y)|(._MY)') Commented by andondap as per TD#9648 Changes
AND b.last_update_date BETWEEN TO_DATE ('2012/11/25', 'YYYY/MM/DD') AND TO_DATE ('2013/03/23', 'YYYY/MM/DD')+ 0.9999
AND REGEXP_LIKE ( rs.name,'(.MY)|(Muti.*Y))|(Multi.*Y)|(._MY) |(mlti)')
AND rs.name LIKE '%SVC%MULTI%' OR rs.name NOT LIKE '%DUMMY%' OR rs.name LIKE 'Svc%Multi%' OR rs.name LIKE 'Svc%MY%'
OR rs.name LIKE 'Service%Multi%' OR rs.name LIKE '%MY_SHARE_TM' OR rs.name LIKE '%MY_SHARE_T')
ORDER BY a.order_number, b.creation_date
Thanks
HibinHmmm, let's see...
1. OP provided formatted code using {noformat}{noformat} tags.... - FAILED
2. OP provided database version in full... - FAILED
3. OP provided table structures and index information... - FAILED
4. OP provided cardinality and selectivity information... - FAILED
5. OP provided explain plans... - FAILED
6. OP provided execution traces... - FAILED
7. OP is a new member and can be excused for above failures... - FAILED
8. OP has asked previous questions and followed forum etiquette by marking them as answered... - FAILED
9. OP has respected volunteers and other questioners by not marking his question as Urgent... - FAILED
10. OP has read the forum FAQ ({message:id=9360002}) for posting his question... - FAILED
11. OP has read the forum FAQ ({message:id=9360003}) for posting a tuning question... - FAILED
It's a good job you're not a computer program, you wouldn't have even compiled.
so, points to note:
This is a forum of volunteers. There's no such thing as an Urgent question here, and it's considered rude to suggest your question is urgent, as that indicates you want immediate attention from the people who are giving up their own time to help, and who have their own jobs to do. It's also rude for the other people who are asking questions, as everyone would like an answer to their problem as soon as possible, so what makes you any more special? An urgent issue is one where a live system is down potentially putting people's lives at risk or causing a company to lose money, or somehow damage their services. Such issues should be logged with Oracle Support, not on the free OTN forums.
Next, when you post your question, ensure you provide all the information that is needed for people to be able to help you. Read the FAQ posts which point to useful threads indicating what information is required, especially for tuning requests.
Finally, when your questions have been answered, it is common courtesy to mark them as answered (and award points if appropriate), otherwise it indicates that you have no respect for the people who are helping you.
If you follow all the advice above, you will end up creating a good question that people will be willing to help you with. If you don't follow the advice above, such as in this question you've posted, you will find that few experts will bother to help (or if they post it will not likely be helpful advise you receive). The choice is yours. -
BW statistics cube and query Very Urgent!!
Hi Everyone,
I want to find out the query performance of all our customized infocubes in the bw system.
But I am not able to find our infocubes in 0BWTC_C02, 0BWTC_C03 etc. even in the queries 0BWTC_C10_Q014, 0BWTC_C10_Q507 I cannot find out queries which were created for our customized i.e Zinfocubes.
What could be the problem?
Is some installation missing or do we have to update. How can I find out this information.
Its really urgents can anyone please let me know.
Thanks,
Prashant.Hi,
I requested the delta update as you have specified. But it is still in yellow and I get these messages.
<b>Request still running
Diagnosis
No errors could be found. The current process has probably not finished yet.
System response
The ALE inbox of the SAP BW is identical to the ALE outbox of the source system
and/or
the maximum wait time for this request has not yet run out
and/or
the batch job in the source system has not yet ended.
Current status
The processing of the data was not finished.</b>
<b>
Transfer (IDocs and TRFC): Errors occurred
Data Package 1 : arrived in BW ; Processing : Data packet not yet processed
Processing (data packet): Errors occurred
Data Package 1 ( 7917 Records ) : Missing messages
Update ( 0 new / 0 changed ) : Missing messages
Processing end : Missing messages
</b>
These are the messages when i press the details button in the monitor window.
What could be the problem.
Can anyone please help with this.
Thanks,
Prashant. -
Please, please suggest me, Its very Urgent for
Hi everyone,
Please suggest me the right Sound Card. I have bought SBLi've and I found that very essential functionalities for me are missing in this card, which were there in SBLi've "Value".
I have 3 requirments stated below.
. Sound Card using which, I will be able to change Each and every Parameters of Reverb effect. (like delay, early reflection etc.) to make a custom efx.
2. The custom efx could be assigned Only to a Selected Source, like efx set on the Microphone input only (and Not on the main Output).
3. The efx should be processed by the Hardware only (not software rendered), directly through the Chip.
The SBLIVE!"Value" handled all these 3 requirments, but with SBLi've24bit I found that these things have been completely removed from the chip. moreover it seems to process the efx using the software, the sound has a distorted noise.
Thanks.Message Edited by Deba on 05-06-2005 06:02 PMHi Sridhar,
Thanks for ur reply.
Seg5 is under Seg4 and
seg6 is under seg5.
BLOBE is just a string on the target side under node Segment4
Iam concanating all the fields in seg5 and seg6 and mapping into Single string "BLOBE" which is at the target side of node Segment4.
Source Target
Seg4 Seg4
_____seg5 (1:unbounded)
|_____seg6 (1:unbounded) |___BLOBE(1:unbounded)
Pls reply me if u need any clarification.
Regards
Vijaya.
Maybe you are looking for
-
Error message while Archiving the PO on 4.6C version
Hello Team , We are archiving the PO in SAP 4.6C version. Some of the PO failed with the below error message "4203018801 Item 00002 still entered in info record as last document item". i have kept the deletion flag for the info record and tried to a
-
New PC - I need to move all settings and set up
I have a new PC and I want to move CS6 onto it. I know how to deactivate and install CS6 but I want to move my personal settings over as well is there any way I can do this or do I have to set each product up as I have done in the past? Thanks,
-
Possible to receive Korean e-mails?
I received an email written in korean on my gmail account (that is paired with my iPhone), but on the phone the korean text does not show, instead, it shows all the "weird" symbols (usually happens when the computer/iphone does not support multiple l
-
How to config a shared cache for multiple environments with C API
How to config a shared cache for multiple environments with C API? Just like Java edition. Chapter 2. Database Environments I want to open large number of databases, at least 10,000. But as the counts of databases opened increase, the db->open opera
-
Mac OS 9.1 for PM G4 digital audio
I have a PowerMac G4 digital audio and want to install Mac OS 9.1 on it. That particular machine requires a version of 9.1 with ROM 6.7.1, different than the standard 9.1 installation disk. Anyone have a lead as to where I could obtain the correct di