Cube Related Query.Please Suggest on this
Hi All,
I want to create a New Cube from 1 Cube and 2 DSO .For that how to create a transformation it will ask either to create from Cube or DSO but not both .
Data Flow Diagram
New Cube
Cube DSO DSO
Please Suggest on this
Thanks & Regards
Sameer Khan
Hi,
Create a New Cube, But u need to create Three different Transfermations nad three DTPs.
execute three DTPs to load data.
Assigning points in sdn is saying thanks.
Regards,
CK.
Similar Messages
-
Please Suggest on this(Query Designer)
Hi ALL,
I want to design reports from one Query as shown below other
Cost of setup
(In US$)
Items Market Price Discount
Construction cost 10 8
Building cost 20 18
Land Cost 30 28
Material Cost 40 38
Total 100 90
Cost of setup
(In INR )
Items Market Price Discount
Construction cost 10 8
Building cost 20 18
Land Cost 30 28
Material Cost 40 38
Total 100 90
Please Suggest on this.
Thanks & Regards
Sameer KhanHi ALL,
I want to design reports from one Query as shown below other
Cost of setup
(In US$)
Items -
Market Price----
Discount
Construction cost----
10 -
8
Building cost -
20 -
18
Land Cost -
30 -
28
Material Cost -
40 -
38
Total -
100 -
90
Cost of setup
(In INR )
Items -
Market Price----
Discount
Construction cost----
10 -
8
Building cost -
20 -
18
Land Cost -
30 -
28
Material Cost -
40 -
38
Total -
100 -
90
Please Suggest on this.
Thanks & Regards
Sameer Khan -
Hi Please Suggest on this(DSO).
Hi ALL,
I want to remove few objects from Key & Data Field in DSO .When i drag to remove it is not working.
Please anyone can suggest on this
Thanks & Regards
Sameer KhanWhenever you do modifications to physical data providers like cube,DSo,Master data...
You need to first delete the content of data nad make modification,Then activate and load to reflect the changes carried out.
Thanks
shana
Assign pts if it is useful -
Need guidance in where caluse of a select query.Please suggest.
Hi All,
I have a internal table IT_INPUT which includes multiple cost centers . Now for all entries in IT_INPUT-COst center i want to selct the records from COP table. The issue i am fasing is - Cost center is concatenated with some other values and stored in OBJNR field of COSP table like ex KSSPS1SF518 (SF518 is a cost center here, thease fields are of variable lenth)
ex :
SELECT objnr gjahr wrttp versn kstar wkf001 wkf002 wkf003 wkf004
wkf005 wkf006 wkf007 wkf008 wkf009 wkf010 wkf011 wkf012
FROM cosp INTO TABLE it_cosp
FOR ALL ENTRIES IN it_input
where objnr?
what should we give in where claue. please suggest
Thanks,
RaviYou can use the code a little modification of a above code...
we will concatenate 2 * before and after the cost center. this will allow us to get the right result
check it and let me know
data:lr_objnr type range of cosp-objnr.
data:wa like line of lr_objnr.
wa-option = 'CP'.
wa-sign = 'I'.
Concatenate '*'
'SFS18' <cost center>
INTO wa-low.
append wa to lr_objnr.
SELECT objnr gjahr wrttp versn kstar wkf001 wkf002 wkf003 wkf004
wkf005 wkf006 wkf007 wkf008 wkf009 wkf010 wkf011 wkf012
FROM cosp INTO TABLE it_cosp
FOR ALL ENTRIES IN it_input
where objnr in lr_objnr. -
Please Suggest on this(Bex Analyser)
Hi ALL,
I need to design the structure as shown below.
Structure
Current Accounts Receivable
1301000 Accounts Receivable
1301010 Merchandise Customer Receivables
1301020 Goods Not for Resale Customer Receivables
1301030 Associate Customer Receivables
1301040 Freight Customer Receivables
1301050 Intercompany Customer Receivables
1301060 One Time Customer Receivables
1301070 Third Party and Insurance Customer Receivables
1301080 AR Other Customer Receivables
Total
Current Accounts Receivable
1301000 Accounts Receivable
1301010 Merchandise Customer Receivables
1301020 Goods Not for Resale Customer Receivables
1301030 Associate Customer Receivables
1301040 Freight Customer Receivables
1301050 Intercompany Customer Receivables
1301060 One Time Customer Receivables
1301070 Third Party and Insurance Customer Receivables
1301080 AR Other Customer Receivables
Total
Please can any one suggest on this.Thanks For Reply
I am not getting NODim function ,Its not allowing to type maually .Please help me on using it .
Thanks & Regards
Sameer Khan -
Hi ALL ,
Iam a business object XI Developer ,Now i have an option to go SAP BW or to continue working in Businessobjects and SAP acquired BO .Its confusion for me which one to select
can anyone please suggest which way is best .
Thanks & Regards
Sameer Khanhi,
if you know BO, and have he option to work with BI its good hope u could proceed with BI.
Business one
http://www.ciol.com/content/news/2006/106012308.asp
http://contextlabs.in/pdfs/SAP_Business_One-Brochure.pdf
Ramesh -
Business areas related question- please suggest
Hello,
we are implementing mySAP 05 from scratch , please suggest if we should define business area and if we can use them wihtout flaging it at the company code level. is it beeter to just rely on profit center and acitvate it required for all accocunts instead of using business areas, we are trying to avoid using BA's actaully so really need good advice if the same functionaluty can be captured by pca and how can it be acheieved.
kindly suggest, points will be awadredHi,
I suggest that you should go with Profit Center Accounting and not Business Areas. As you are implementing from scratch I suggest that you use New GL where the functionality of segment accounting / Leading ledger and other ledgers are quite good and will be helpful.
Some of the OSS Notes which you can refer are 826357, 1018065. There is alkso a specific OSS note which distinguishes Profit Center Accounting and Business Areas. I will let you know the Note number once I trace it.
Thanks
Murali. -
ABAP or SAP BW please suggest on this
Hi ALL,
I am new SAP environment i worked in Business objects earlier now i have an option to select ABAP or SAPBW .
Please can anyone suggest which one i need to prefer and why .
Thanks & Regards
Sameer KhanSammer,
Both fields are good...enough carrer opportunity. But BW will suite you more becoz of BO. However, if you have inclination for Programming then go for ABAP.
A common belief that BW is more lucrative that ABAP, but the fact is you have to outsmart in whatever you do...ABAP or BW.
hanks..
Shambhu -
Hi ALL,
Iam new to SAP BW environment, earlier i had worked in Business Objects.
I need to learn myself so, Please can anyone guide me how to proceed on this.
Thanks & Regards
Sameer KhanThere are few good books available for this:
1. FU FU
2. Step by step BW
http://books.google.co.in/books?hl=en&id=3wBjrMDWescC&dq=stepbystep+BW&printsec=frontcover&source=web&ots=RInU0siJfx&sig=xiwGy71fbrT_g5hGAqXX-FE0K-c&sa=X&oi=book_result&resnum=5&ct=result#PPP1,M1
3. Mastering BW
before you jump on project, its better to have a sound technical knowledge of the subject. -
Problem in upgrading TYPE X... Please suggest
Hi,
I want to upgrade the below code.
line(256) TYPE x.
Please suggest in this, how to handle this hexadecimal type of length 256.
Thanks,
RaviRavi,
Use the Class CL_ABAP_CONV_OUT_CE, Method UCCP.
This returns a hex value.
Hope this would be of help. -
Converting Relational query to XML
set serveroutput on
This is the code of a query to convert a relational query to xml. This code runs fine when I place the where condition at the end. e.g. where h.hospital_id=1. however when i place no such condition it begins returning errors such as
set serveroutput on
set long 10000000
set linesize 50000
set lines 20000
set pagesize 0
set pages 5
set feedback off
set head off
SET TRIMSPOOL ON
set long 200000000
set linesize 32000
set pagesize 0
set pages 0
set feedback off
set head off
Select XMLELEMENT("have:HospitalStatus",XMLAttributes('urn:oasis:names:tc:emergency:EDXL:HAVE:1.0 edxl-have_cs01.xsd' AS
"xsi:schemaLocation",
'urn:oasis:names:tc:emergency:EDXL:HAVE:1.0' AS
"xmlns:have",
'http://www.georss.org/georss' AS
"xmlns:n3",
'http://www.opengis.net/gml' AS
"xmlns:gml",
'http://www.w3.org/2001/XMLSchema-instance' AS
"xmlns:xsi",
'urn:oasis:names:tc:ciq:xal:3' AS
"xmlns:xal",
'urn:oasis:names:tc:ciq:xnl:3' AS
"xmlns:xnl",
'urn:oasis:names:tc:ciq:xpil:3' AS
"xmlns:xpil"
xmlagg(
xmlelement("have:Hospital",
xmlforest
( h.hospital_id,
xmlforest(
xmlforest(
h.name,
h.info,
h.addresses ,
h.contact_numbers) as "OrganizationInformation",
xmlforest(
h.geo_location) as "OrganizationGeoLocation",
h.comments) as "Organization"
xmlelement("have:EmergencyDepartmentStatus",
(select xmlagg(
xmlforest(
eds.date_updated,
xmlforest(
eds.ems_traffic_status,
eds.ems_traffic_reason) as "EMSTraffic",
xmlforest(
tcl.url,
tc.date_updated,
tc.code_value,
tc.ems_capacity
) as "EMSCapacity",
xmlforest(
tcl.url,
tc.date_updated,
tc.code_value,
tc.ems_census) as "EMSCensus",
xmlforest(
eds.ems_amb_offload_status,
eds.ems_amb_offload_min) as "EMSAmbulanceStatus",
xmlforest(
eds.ems_air_offload_status,
eds.ems_air_offload_min )as "EMSAirTransportStatus"
from EmergencyDepartmentStatus eds,TriageCode tc,TriageCodeListURN tcl
where eds.hospital_id = h.hospital_id and tc.hospital_id = h.hospital_id and tcl.hospital_id = h.hospital_id)),
xmlelement("have:HospitalBedCapacityStatus",
(select xmlagg(xmlelement("have:BedCapacity",
xmlforest(
mb.date_updated,
mb.bed_no,
mb.bed_type,
xmlforest(
mb.capacity_status,
mb.available_count,
mb.baseline_count,
mb.additional_24hr,
mb.additional_72hr) as "Capacity",
mb.comments
from MainBeds mb
where mb.hospital_id = h.hospital_id and mb.bed_no NOT IN(select mb.bed_no from MainBeds mb, SubBeds sb where mb.bed_no=sb.bed_no )
(select xmlagg(xmlelement("have:BedCapacity",
xmlforest(
mb.date_updated,
mb.bed_no ,
mb.bed_type,
xmlforest(
mb.capacity_status
) as "Capacity",
mb.comments
),(select xmlagg(
xmlforest(
sb.date_updated,
sb.bed_no,
sb.sub_bed_no,
xmlforest(
sb.capacity_status,
sb.available_count,
sb.baseline_count,
sb.additional_24hr,
sb.additional_72hr) as "Capacity",
sb.comments
)from SubBeds sb where mb.bed_no = sb.bed_no and sb.bed_no=h.hospital_id )
from MainBeds mb
where mb.hospital_id = h.hospital_id and mb.bed_no in (select unique mb.bed_no from MainBeds md, SubBeds sb where sb.bed_no=mb.bed_no))
xmlelement("have:ServiceCoverageStatus",
(select xmlagg(
xmlforest(
scs.date_updated,
scs.burn,
xmlelement("CardiologySubType",
xmlforest(scs.cardiology_invasive,
scs.cardiology_non_invasssive)) as "CardiologyIndicator",
scs.dialysis,
scs.emergency_dept,
scs.hyperbaric_chamber,
scs.infectious_diseases,
scs.neonatology,
xmlforest(xmlforest(
scs.neurology_invassive,
scs.neurology_non_invasssive) as "NeurologySubType") as "NeurologyIndicator",
xmlforest(xmlforest(
scs.obgyn_with_labor,
scs.obgyn_without_labor) as "OBGYNSubType")as "OBGYNIndicator",
scs.opthalmology,
scs.orthopedic,
scs.pediatrics,
xmlforest(
xmlforest(scs.psychiatry_adult_general,
scs.psychiatry_pediatric) as"PsychiatrySubType")as "PsychiatryIndicator",
xmlforest(
xmlforest(
sst.date_updated,
sst.general_ward,
sst.adult_general,
sst.pediatrics,
sst.orthopedics,
sst.nuero_surgery,
sst.facial,
sst.cardio_thoracic,
sst.hand,
sst.reimplantation,
sst.spinal,
sst.vascular,
sst.anesthesia) as "SurgerySubTypes") as "SurgeryIndicator",
xmlforest(xmlforest(
scs.ambulance_services,
scs.air_transport_services) as "TransportServicesSubType") as "TransportServicesIndicator",
xmlforest(xmlforest(
scs.trauma_service,
scs.trauma_service_level) as "TraumaCenterServicesSubType")as "TraumaCenterServicesIndicator"
from ServiceCoverageStatus scs, SurgerySubTypes sst
where scs.hospital_id = h.hospital_id and sst.hospital_id = h.hospital_id)),
xmlelement("have:HospitalFacilityStatus",
(select xmlagg(
xmlforest(
hfs.date_updated,
hfs.hospital_eoc_status,
hfs.hospital_eoc_plan,
hfs.clinical_status,
xmlforest(
dc.date_updated,
dc.decon_capacity_status,
dc.amb_patients_capacity,
dc.non_amb_patients_capacity) as "DeconCapacity",
xmlforest(
mc.date_updated,
mc.morgue_capacity_status,
mc.morgue_capacity_units) as "MorgueCapacity",
hfs.facility_status,
hfs.security_status,
xmlforest(
ah.date_update,
ah.admissions,
ah.discharges,
ah.deaths) as "Activity24hr",
hfs.comments,
hfs.clinical_operations,
hfs.resources_information
from HospitalFacilityStatus hfs,Activity24hr ah,MorgueCapacity mc,DeconCapacity dc
where hfs.hospital_id = h.hospital_id and ah.hospital_id = h.hospital_id and mc.hospital_id = h.hospital_id
and dc.hospital_id = h.hospital_id)),
xmlelement("have:HospitalResourceStatus",
(select xmlagg(
xmlforest(
hr.date_updated,
hr.staffing,
hr.facility_operations,
hr.clinical_operations,
hr.comments
from HospitalResourceStatus hr
where hr.hospital_id = h.hospital_id)),
xmlforest(h.last_update_time) as "UpdateTime"
))).extract('/*')
from hospital h;__________________________________________________________________________________________________________
ERROR:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "HOSPITAL_EOC_STATUS" does not match start-element tag "have:HospitalStatus"
Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 111
Edited by: 872489 on 14-Jul-2011 03:59
Edited by: 872489 on Jul 14, 2011 9:11 AM
Apologies for lack of formatting earlierPlease repost this and use the tag with some decent formatting.
See the FAQ Posting Guidelines on the main page of this XMLDB OTN Forum -
Can someone please suggest me in tuning this query?
Can someone please suggest me in tuning this query?
select pemail.email_oid,
pemail.parent_oid,
md.message_data_oid,
ea.email_account_oid,
ef.email_folder_oid,
md.channel,
ea.email_account_name,
md.from_address,
md.to_address,
eref.ref_id ticket_number,
( select count(email_oid) from esg.email where email_oid = pemail.email_oid and email.attachment_flag = 'Y' ) attachment_flag_a,
( select count(email_oid) from esg.email cemail
where cemail.parent_oid = pemail.email_oid and
( cemail.email_type is null or cemail.email_type != 'S') and
cemail.vec_status not in ('G', 'D', 'P') and
cemail.vec_status in ('N', 'O') and
cemail.attachment_flag = 'Y' ) attachment_flag_b,
md.received_date,
pemail.vec_status,
pemail.email_type,
md.subject,
md.content,
pemail.tracking_id,
pemail.assignee_oid,
( select count(email_oid) from email cemail
where cemail.parent_oid = pemail.email_oid and
(cemail.email_type is null or cemail.email_type != 'S' ) and
cemail.vec_status not in ('G','D', 'P') and
cemail.vec_status in ('N', 'O' ) ) child_email_cnt,
( select count(0) from email
where vec_status = 'N' and
email_type = 'O' and
email_oid = pemail.email_oid and
vec_status in ('N', 'O' )) parent_newemail_cnt,
( select count(0) from email
where vec_status = 'N' and
email_type = 'O' and
parent_oid = pemail.email_oid and
vec_status in ('N', 'O' )) child_newemail_cnt
From esg.email pemail,
esg.message_data md,
esg.email_account ea,
esg.email_folder ef,
(select email_oid, ref_id from email_ref
where email_ref_oid in (select min(email_ref_oid) from email_ref where ref_tid = -9000 and ref_sid = 'ESG' and confirmed_flag = 'Y' group by email_oid )) eref
where
md.message_data_oid = pemail.message_data_oid and
pemail.email_folder_oid = ef.email_folder_oid(+) and
ef.email_account_oid = ea.email_account_oid(+) and
pemail.vec_status not in ('G','D','P') and
pemail.vec_status in ('N', 'O') and
pemail.email_oid = eref.email_oid(+) and
lower(md.channel) in ('[email protected]', '[email protected]') and
pemail.email_oid in
( select parent.email_oid from message_data md,
email parent
where md.message_data_oid = parent.message_data_oid and
parent.parent_oid is null and
pemail.email_type = 'O' and
lower(md.to_address) in
( select lower(contact_info) from esg.user_profile up,
esg.person p,
esg.person_contact pc
where up.user_oid = 802239 and
up.person_oid = p.person_oid and
p.person_oid = pc.person_oid and
pc.contact_type_oid = 6 )
union all
select child.parent_oid from message_data md,
email child
where md.message_data_oid = child.message_data_oid and
parent_oid is not null and
child.vec_status not in ('G','D','P') and
child.vec_status in ('N', 'O') and
child.email_type = 'O' and
lower(md.to_address) in
( select lower(contact_info) from esg.user_profile up,
esg.person p,
esg.person_contact pc
where up.user_oid = 802239 and
up.person_oid = p.person_oid and
p.person_oid = pc.person_oid and
pc.contact_type_oid = 6 )
ORDER BY RECEIVED_DATE DESC;
1st run
Elapsed: 00:00:03.39
2nd run
Elapsed: 00:00:01.80
SQL> Select TABLE_NAME,LAST_ANALYZED, num_rows from user_tables where table_name in ('EMAIL','MESSAGE_DATA', 'EMAIL_ACCOUNT','EMAIL_FOLDER','EMAIL_REF','USER_PROFILE','PERSON','PERSON_CONTACT');
TABLE_NAME LAST_ANAL NUM_ROWS
USER_PROFILE 11-JUN-11 385808
PERSON_CONTACT 11-JUN-11 698624
PERSON 11-JUN-11 405364
MESSAGE_DATA 11-JUN-11 1069
EMAIL_REF 11-JUN-11 559
EMAIL_FOLDER 11-JUN-11 563
EMAIL_ACCOUNT 11-JUN-11 563
EMAIL 11-JUN-11 101652
8 rows selected.
row count from all tables
email - 102063
message_data - 1069
email_account - 563
email_folder - 563
email_ref - 559
user_profile - 386055
person - 404057
person_contact - 698696
Thanks,
Suman M.======================================
Execution Plan
Plan hash value: 110416976
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 1 | 1361 | 17 |
| 1 | SORT AGGREGATE | | 1 | 8 | |
|* 2 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 8 | 1 |
|* 3 | INDEX UNIQUE SCAN | PK_EMAIL | 1 | | 1 |
| 4 | SORT AGGREGATE | | 1 | 8 | |
|* 5 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 8 | 1 |
|* 6 | INDEX RANGE SCAN | FK_EMAIL_PARENT | 3 | | 1 |
| 7 | SORT AGGREGATE | | 1 | 6 | |
|* 8 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 6 | 1 |
|* 9 | INDEX RANGE SCAN | FK_EMAIL_PARENT | 3 | | 1 |
| 10 | SORT AGGREGATE | | 1 | 10 | |
|* 11 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 10 | 1 |
|* 12 | INDEX UNIQUE SCAN | PK_EMAIL | 1 | | 1 |
| 13 | SORT AGGREGATE | | 1 | 6 | |
|* 14 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 6 | 1 |
|* 15 | INDEX RANGE SCAN | FK_EMAIL_PARENT | 3 | | 1 |
| 16 | SORT ORDER BY | | 1 | 1361 | 17 |
|* 17 | FILTER | | | | |
| 18 | NESTED LOOPS OUTER | | 1 | 1361 | 5 |
| 19 | NESTED LOOPS OUTER | | 1 | 1336 | 4 |
| 20 | NESTED LOOPS | | 1 | 1328 | 3 |
| 21 | NESTED LOOPS OUTER | | 1 | 53 | 2 |
| 22 | INLIST ITERATOR | | | | |
| 23 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 35 | 1 |
|* 24 | INDEX RANGE SCAN | IE_EMAIL | 55 | | 1 |
| 25 | VIEW PUSHED PREDICATE | | 1 | 18 | 1 |
| 26 | NESTED LOOPS | | 1 | 36 | 4 |
| 27 | VIEW | VW_NSO_1 | 11 | 143 | 3 |
| 28 | SORT GROUP BY | | 11 | 231 | 3 |
|* 29 | TABLE ACCESS BY INDEX ROWID| EMAIL_REF | 11 | 231 | 3 |
|* 30 | INDEX FULL SCAN | AK1_EMAIL_REF | 21 | | 3 |
|* 31 | TABLE ACCESS BY INDEX ROWID | EMAIL_REF | 1 | 23 | 1 |
|* 32 | INDEX UNIQUE SCAN | PK_EMAIL_REF | 1 | | 1 |
|* 33 | TABLE ACCESS BY INDEX ROWID | MESSAGE_DATA | 1 | 1275 | 1 |
|* 34 | INDEX UNIQUE SCAN | PK_MESSAGE_DATA | 1 | | 1 |
| 35 | TABLE ACCESS BY INDEX ROWID | EMAIL_FOLDER | 1 | 8 | 1 |
|* 36 | INDEX UNIQUE SCAN | PK_EMAIL_FOLDER | 1 | | 1 |
| 37 | TABLE ACCESS BY INDEX ROWID | EMAIL_ACCOUNT | 1 | 25 | 1 |
|* 38 | INDEX UNIQUE SCAN | PK_EMAIL_ACCOUNT | 1 | | 1 |
| 39 | UNION-ALL | | | | |
| 40 | NESTED LOOPS SEMI | | 1 | 116 | 5 |
| 41 | NESTED LOOPS | | 1 | 50 | 2 |
|* 42 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 14 | 1 |
|* 43 | INDEX UNIQUE SCAN | PK_EMAIL | 1 | | 1 |
| 44 | TABLE ACCESS BY INDEX ROWID | MESSAGE_DATA | 1069 | 38484 | 1 |
|* 45 | INDEX UNIQUE SCAN | PK_MESSAGE_DATA | 1 | | 1 |
|* 46 | VIEW | VW_NSO_3 | 1 | 66 | 3 |
|* 47 | FILTER | | | | |
| 48 | NESTED LOOPS | | 1 | 45 | 3 |
| 49 | NESTED LOOPS | | 1 | 15 | 2 |
| 50 | TABLE ACCESS BY INDEX ROWID | USER_PROFILE | 1 | 10 | 1 |
|* 51 | INDEX UNIQUE SCAN | PK_USER | 1 | | 1 |
|* 52 | INDEX UNIQUE SCAN | PK_PERSON | 405K| 1979K| 1 |
|* 53 | TABLE ACCESS BY INDEX ROWID | PERSON_CONTACT | 1 | 30 | 1 |
|* 54 | INDEX RANGE SCAN | FK_PERSON_CONTACT_PERSON | 2 | | 1 |
| 55 | NESTED LOOPS | | 1 | 114 | 5 |
| 56 | MERGE JOIN CARTESIAN | | 1 | 78 | 4 |
|* 57 | TABLE ACCESS BY INDEX ROWID | EMAIL | 1 | 12 | 1 |
|* 58 | INDEX RANGE SCAN | FK_EMAIL_PARENT | 1 | | 1 |
| 59 | BUFFER SORT | | 1 | 66 | 3 |
| 60 | VIEW | VW_NSO_2 | 1 | 66 | 3 |
| 61 | SORT UNIQUE | | 1 | 45 | |
| 62 | NESTED LOOPS | | 1 | 45 | 3 |
| 63 | NESTED LOOPS | | 1 | 15 | 2 |
| 64 | TABLE ACCESS BY INDEX ROWID| USER_PROFILE | 1 | 10 | 1 |
|* 65 | INDEX UNIQUE SCAN | PK_USER | 1 | | 1 |
|* 66 | INDEX UNIQUE SCAN | PK_PERSON | 405K| 1979K| 1 |
|* 67 | TABLE ACCESS BY INDEX ROWID | PERSON_CONTACT | 1 | 30 | 1 |
|* 68 | INDEX RANGE SCAN | FK_PERSON_CONTACT_PERSON | 2 | | 1 |
|* 69 | TABLE ACCESS BY INDEX ROWID | MESSAGE_DATA | 1 | 36 | 1 |
|* 70 | INDEX UNIQUE SCAN | PK_MESSAGE_DATA | 1 | | 1 |
Predicate Information (identified by operation id):
2 - filter("EMAIL"."ATTACHMENT_FLAG"='Y')
3 - access("EMAIL_OID"=:B1)
5 - filter("CEMAIL"."EMAIL_TYPE"<>'S' AND "CEMAIL"."VEC_STATUS"<>'G' AND
"CEMAIL"."VEC_STATUS"<>'D' AND "CEMAIL"."VEC_STATUS"<>'P' AND ("CEMAIL"."VEC_STATUS"='N'
OR "CEMAIL"."VEC_STATUS"='O') AND "CEMAIL"."ATTACHMENT_FLAG"='Y')
6 - access("CEMAIL"."PARENT_OID"=:B1)
8 - filter("CEMAIL"."EMAIL_TYPE"<>'S' AND "CEMAIL"."VEC_STATUS"<>'G' AND
"CEMAIL"."VEC_STATUS"<>'D' AND "CEMAIL"."VEC_STATUS"<>'P' AND ("CEMAIL"."VEC_STATUS"='N'
OR "CEMAIL"."VEC_STATUS"='O'))
9 - access("CEMAIL"."PARENT_OID"=:B1)
11 - filter("VEC_STATUS"='N' AND "EMAIL_TYPE"='O')
12 - access("EMAIL_OID"=:B1)
14 - filter("VEC_STATUS"='N' AND "EMAIL_TYPE"='O')
15 - access("PARENT_OID"=:B1)
17 - filter( EXISTS ( (SELECT "PARENT"."EMAIL_OID" FROM "EMAIL" "PARENT","MESSAGE_DATA"
"MD", (SELECT LOWER("CONTACT_INFO") "$nso_col_1" FROM "ESG"."PERSON_CONTACT"
"PC","ESG"."PERSON" "P","ESG"."USER_PROFILE" "UP" WHERE :B1='O' AND
"UP"."USER_OID"=802239 AND "UP"."PERSON_OID"="P"."PERSON_OID" AND
"P"."PERSON_OID"="PC"."PERSON_OID" AND "PC"."CONTACT_TYPE_OID"=6)
"VW_NSO_3" WHERE
"$nso_col_1"=LOWER("MD"."TO_ADDRESS") AND "MD"."MESSAGE_DATA_OID"="PARENT"."MESSAGE_DATA_O
ID" AND "PARENT"."EMAIL_OID"=:B2 AND "PARENT"."PARENT_OID" IS NULL
) UNION ALL (SELECT
"CHILD"."PARENT_OID" FROM "EMAIL" "CHILD","MESSAGE_DATA" "MD", (SELECT DISTINCT
LOWER("CONTACT_INFO") "$nso_col_1" FROM "ESG"."PERSON_CONTACT" "PC","ESG"."PERSON"
"P","ESG"."USER_PROFILE" "UP" WHERE "UP"."USER_OID"=802239 AND
"UP"."PERSON_OID"="P"."PERSON_OID" AND "P"."PERSON_OID"="PC"."PERSON_OID" AND
"PC"."CONTACT_TYPE_OID"=6) "VW_NSO_2" WHERE "MD"."MESSAGE_DATA_OID
"="CHILD"."MESSAGE_DATA_
OID" AND "$nso_col_1"=LOWER("MD"."TO_ADDRESS") AND "CHILD"."PARENT
_OID"=:B3 AND
"CHILD"."VEC_STATUS"<>'G' AND "CHILD"."VEC_STATUS"<>'D' AND "CHILD
"."VEC_STATUS"<>'P' AND
("CHILD"."VEC_STATUS"='N' OR "CHILD"."VEC_STATUS"='O') AND "CHILD"
."EMAIL_TYPE"='O' AND
"PARENT_OID" IS NOT NULL)))
24 - access("PEMAIL"."VEC_STATUS"='N' OR "PEMAIL"."VEC_STATUS"='O')
filter("PEMAIL"."VEC_STATUS"<>'G' AND "PEMAIL"."VEC_STATUS"<>'D' AND
"PEMAIL"."VEC_STATUS"<>'P')
29 - filter("CONFIRMED_FLAG"='Y')
30 - access("REF_SID"='ESG' AND "REF_TID"=(-9000))
filter("REF_TID"=(-9000) AND "REF_SID"='ESG')
31 - filter("EMAIL_OID"="PEMAIL"."EMAIL_OID")
32 - access("EMAIL_REF_OID"="$nso_col_1")
33 - filter(LOWER("MD"."CHANNEL")='[email protected]' OR
LOWER("MD"."CHANNEL")='[email protected]')
34 - access("MD"."MESSAGE_DATA_OID"="PEMAIL"."MESSAGE_DATA_OID")
36 - access("PEMAIL"."EMAIL_FOLDER_OID"="EF"."EMAIL_FOLDER_OID"(+))
38 - access("EF"."EMAIL_ACCOUNT_OID"="EA"."EMAIL_ACCOUNT_OID"(+))
42 - filter("PARENT"."PARENT_OID" IS NULL)
43 - access("PARENT"."EMAIL_OID"=:B1)
45 - access("MD"."MESSAGE_DATA_OID"="PARENT"."MESSAGE_DATA_OID")
46 - filter("$nso_col_1"=LOWER("MD"."TO_ADDRESS"))
47 - filter(:B1='O')
51 - access("UP"."USER_OID"=802239)
52 - access("UP"."PERSON_OID"="P"."PERSON_OID")
53 - filter("PC"."CONTACT_TYPE_OID"=6)
54 - access("P"."PERSON_OID"="PC"."PERSON_OID")
57 - filter("CHILD"."VEC_STATUS"<>'G' AND "CHILD"."VEC_STATUS"<>'D' AND
"CHILD"."VEC_STATUS"<>'P' AND ("CHILD"."VEC_STATUS"='N' OR "CHILD"
."VEC_STATUS"='O') AND
"CHILD"."EMAIL_TYPE"='O')
58 - access("CHILD"."PARENT_OID"=:B1)
filter("PARENT_OID" IS NOT NULL)
65 - access("UP"."USER_OID"=802239)
66 - access("UP"."PERSON_OID"="P"."PERSON_OID")
67 - filter("PC"."CONTACT_TYPE_OID"=6)
68 - access("P"."PERSON_OID"="PC"."PERSON_OID")
69 - filter("$nso_col_1"=LOWER("MD"."TO_ADDRESS"))
70 - access("MD"."MESSAGE_DATA_OID"="CHILD"."MESSAGE_DATA_OID")
Note
- cpu costing is off (consider enabling it)
Statistics
3103 recursive calls
0 db block gets
599654 consistent gets
2915 physical reads
0 redo size
1955 bytes sent via SQL*Net to client
3895 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
331 sorts (memory)
0 sorts (disk)
0 rows processed
===================================== -
Suggest the query to this tricky query please
Hi people,
I just got a query which is a brain tease for me (not all).
that is
sql> select * from mytab;
sql> no name
1 asuri
1 prasanth
2 brian
2 lara
the above is query is returned by the sql;
here 1 and 2 are duplicated values;
now output required is
sql>no name
1 asuri prasanth
2 brain lara
Is this possible with a single sql query;
please tell me solution
regards
prasanthHow do find that it should be brian lara not lara brian..
But any way the following will do ...SQL> select * from mytab;
A NAME
1 asuri
1 prasanth
2 brian
2 lara
SQL> select a,name||' '||name2 name from
2 (
3 select a,name,lead(name) over (partition by a order by a) name2 from mytab)
4 where name2 is not null;
A NAME
1 asuri prasanth
2 brian lara
The names by above query can be returned as 'lara brian' and 'prasanth asuri' as there is no way telling which one is a surname.. -
Please suggest a select query / sub query with out using any subprograms or
source table: Three columns ORIGIN, DESTINATION,MILES
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Melbourne Sydney 1000
Brisbane Sydney 1000
Perth Darwin 4000
Sydney Brisbane 1000
out put :Three columns ORIGIN, DESTINATION,MILES
Duplicate routes are to be ignored so the output is
Origin Destination Miles
Sydney Melbourne 1000
Perth Adelaide 3000
Canberra Melbounre 700
Brisbane Sydney 1000
Perth Darwin 4000
Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Hi,
user9368047 wrote:
... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
Here's one way, without any functions:
SELECT a.*
FROM source_table a
LEFT OUTER JOIN source_table b ON a.origin = b.destination
AND a.destination = b.origin
AND a.miles = b.miles
WHERE b.origin > a.origin -- Not b.origin > b.origin
OR b.origin IS NULL
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
Corrected WHERE clause after MLVrown (below) -
Suggest me the tricky query please
Hi
i want to write a sql query which shown as follows:
input inline:
a : prasanth
b : asuri
output should be:
prasanth asuri(combination of a and v variables)
that is too without pl/sql block.
please suggest me sql query;
thanks in advance
prasanthHi,
SELECT SYS_CONNECT_BY_PATH(name, ' ') "Path" FROM
(SELECT rownum ID ,rownum-1 PID,name FROM (
SELECT 'CHITTA' NAME FROM DUAL UNION SELECT 'RANJAN' FROM DUAL))
where id = (2) -- this should be max Rownum
START WITH pID=0
CONNECT BY PRIOR id = pid
or if it is a table
SELECT SYS_CONNECT_BY_PATH(dname, ' ') "Path" FROM
(SELECT rownum ID ,rownum-1 PID,dname FROM (select * from dept))
where id = (select max(rownum) from dept)
START WITH pID=0
CONNECT BY PRIOR id = pid
It is OK With you ..
Bye
Chitta
Maybe you are looking for
-
I need to rotate a string indicator 90 degrees. Is this possible
To make my front panel less cluttered, I would like to have my string indicator rotated 90 degrees counter clockwise. Is this possible and if so will I be able to place it in an array of strings? Any and all help is greatly appreciated.
-
CLA Tags - will adding a '#' in front of the tag screw up Requirements Gateway tracking?
I find it useful in the practice exams to add a '#' in front of the tag comment - eg. #[Covers: UI1] This adds the comment to the bookmarks list so I can easily see and jump to my tags later. Will adding the # upset the marking? Technically the comme
-
HowTo: Use package structure in generated code?
Hi, I'm trying to find out if JCS is meeting my requirements for JSF development. So far it is pretty good, although the lack of support for new components is defeating the purpose of JSF for a great deal. One of the most terrible things I encountere
-
After saving a project in Pages format I often save again as a pdf document and distribute them to others as a pdf document. When I save it as a pdf document using Pages to my desktop, the icon is just a blank square and Pages cannot open its own pdf
-
Looking for Oracle Designer/Headstart Condulat ASAP in Seattle
Please contact [email protected] 425-765-7239 Top $$ paid. Please quote your rate. Message was edited by: vknair