Please help for this Logic
Hi Guys,
We are having a problem translating these scenario to codes:
<b>Total = 1600</b>
<b>Given items:</b>
200
300
400
900
to get the total we need to add (900 + 400 + 200) to get the exact value.
other scenarios: Total: 1350, 750, etc...
In all scenarios.. the less number of items added and closest sum to the total should be chosen.
Thanks in advance!
Regards,
Mike
by the way guys... the items could be randomed in a i_table. thanks!
Similar Messages
-
Hello,
Suppose i have a input xml:
<Name>XYZ</Name>
<Roll>12</Roll>
<Class>3</Class>
Now I want output as:
<Header>XYZ</Header>
<Body><![CDATA[<Name>XYZ</Name>
<Roll>12</Roll>
<Class>3</Class>]]>
</Body>
Please help how will I do that......whole payload is going in Body also some value in above payload is mapping.
Can anyone give me UDF to send whole payload in one node
Thanks and Regards
Hemantthis can be achieved easily by aXSLT mapping....also can be achieved by using grahical mapping
For XSLT coding:
creation of CDATA with message mapping
For graphical + XSLT: /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
Regards,
Abhishek. -
In update statement i am errors can you please help on this logic
BEGIN
SELECT COUNT(1)
INTO v_count
FROM apps.xxcsi_trex_ob_ecs_mhm
WHERE instance_id = NVL(tab_ib_ecs_dat_c(k).instance_id,'');
EXCEPTION
WHEN OTHERS THEN
v_count := 0;
END;
print_log('v_count : '||v_count);
IF v_count = 0 THEN
BEGIN
INSERT
INTO xxcsi_trex_ob_ecs_mhm
instance_id,
instance_number,
inventory_item_id,
unit,
unit_name,
master_organization_id,
serial_number,
quantity,
uom,
active_start_date,
active_end_date,
install_date,
object_version_number,
last_vld_organization_id,
pre_registration_location,
order_header_id,
order_number,
order_line_id,
pre_registration_date,
pre_registration_operator,
bill_to_customer_name,
bill_to_site_id ,
bill_to_state ,
bill_to_country ,
bill_to_city ,
bill_to_location ,
ship_to_customer_name,
ship_to_site_id ,
ship_to_state ,
ship_to_country ,
ship_to_city ,
ship_to_location ,
ship_to_pin_code,
bill_to_pin_code,
ship_to_number,
bill_to_number,
customer_number,
ea_license_number,
ea_va_sales_order_number,
parent_instance_id,
parent_y_n,
process_flag,
error_code,
error_details,
request_id,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
eai_process_flag,
master_organization_name,
system_id,
system_name
VALUES
NVL(tab_ib_ecs_dat_c(k).instance_id,''),
NVL(tab_ib_ecs_dat_c(k).instance_number,''),
NVL(tab_ib_ecs_dat_c(k).inventory_item_id,''),
NVL(tab_ib_ecs_dat_c(k).segment1,''),
NVL(tab_ib_ecs_dat_c(k).description,''),
NVL(tab_ib_ecs_dat_c(k).master_organization_id,''),
NVL(tab_ib_ecs_dat_c(k).serial_number,''),
NVL(tab_ib_ecs_dat_c(k).quantity,''),
NVL(tab_ib_ecs_dat_c(k).uom,''),
NVL(tab_ib_ecs_dat_c(k).active_start_date,''),
NVL(tab_ib_ecs_dat_c(k).active_end_date,''),
NVL(tab_ib_ecs_dat_c(k).install_date,''),
NVL(tab_ib_ecs_dat_c(k).obj_version_num,''),
NVL(tab_ib_ecs_dat_c(k).last_vld_organization_id,''),
NVL(tab_ib_ecs_dat_c(k).pre_registration_location,''),
NVL(tab_ib_ecs_dat_c(k).order_header_id,''),
NVL(tab_ib_ecs_dat_c(k).order_number,''),
NVL(tab_ib_ecs_dat_c(k).order_line_id,''),
NVL(tab_ib_ecs_dat_c(k).actual_shipment_date,''),
NVL(tab_ib_ecs_dat_c(k).email_address,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_company_name,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_site_id,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_state,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_country,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_city,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_location,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_company_name,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_site_id,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_state,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_country,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_city,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_location,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_pin_code,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_pin_code,''),
NVL(tab_ib_ecs_dat_c(k).ship_to_number,''),
NVL(tab_ib_ecs_dat_c(k).bill_to_number,''),
NVL(tab_ib_ecs_dat_c(k).customer_number,''),
NVL(tab_ib_ecs_dat_c(k).ea_license_number,''),
NVL(tab_ib_ecs_dat_c(k).ea_va_sales_order_num,''),
NVL(tab_ib_parent_dat(i).instance_id,''),
'C',
'N',
NULL,
NULL,
v_request_id,
v_created_by,
SYSDATE,
v_created_by,
SYSDATE,
v_last_update_login,
'N',
NVL(tab_ib_ecs_dat_c(k).master_organization_name,''),
NVL(tab_ib_ecs_dat_c(k).system_id,''),
NVL(tab_ib_ecs_dat_c(k).system_name,'')
EXCEPTION
WHEN no_data_found THEN
print_log('Error in main process INSERT 2 : '||sqlerrm);
print_log('Error at : '||v_error_at);
WHEN OTHERS THEN
print_log('Error in main process INSERT 2 : '||sqlerrm);
print_log('Error at : '||v_error_at);
END;
ELSE
Update apps.xxcsi_trex_ob_ecs_mhm set(
instance_id=NVL(tab_ib_ecs_dat_c(k).instance_id,''),
instance_number= NVL(tab_ib_ecs_dat_c(k).instance_number,''),
inventory_item_id= NVL(tab_ib_ecs_dat_c(k).inventory_item_id,''),
unit = NVL(tab_ib_ecs_dat_c(k).segment1,''),
unit_name = NVL(tab_ib_ecs_dat_c(k).description,''),
master_organization_id=NVL(tab_ib_ecs_dat_c(k).master_organization_id,''),
serial_number=NVL(tab_ib_ecs_dat_c(k).serial_number,''),
quantity= NVL(tab_ib_ecs_dat_c(k).quantity,''),
uom=NVL(tab_ib_ecs_dat_c(k).uom,''),
active_start_date= NVL(tab_ib_ecs_dat_c(k).active_start_date,''),
active_end_date= NVL(tab_ib_ecs_dat_c(k).active_end_date,''),
install_date= NVL(tab_ib_ecs_dat_c(k).install_date,''),
object_version_number=NVL(tab_ib_ecs_dat_c(k).obj_version_num,''),
last_vld_organization_id= NVL(tab_ib_ecs_dat_c(k).last_vld_organization_id,''),
pre_registration_location=NVL(tab_ib_ecs_dat_c(k).pre_registration_location,''),
order_header_id=NVL(tab_ib_ecs_dat_c(k).order_header_id,''),
order_number= NVL(tab_ib_ecs_dat_c(k).order_number,''),
order_line_id=NVL(tab_ib_ecs_dat_c(k).order_line_id,''),
pre_registration_date= NVL(tab_ib_ecs_dat_c(k).actual_shipment_date,''),
pre_registration_operator= NVL(tab_ib_ecs_dat_c(k).email_address,''),
bill_to_customer_name=NVL(tab_ib_ecs_dat_c(k).bill_to_company_name,''),
bill_to_site_id = NVL(tab_ib_ecs_dat_c(k).bill_to_site_id,''),
bill_to_state = NVL(tab_ib_ecs_dat_c(k).bill_to_state,''),
bill_to_country =NVL(tab_ib_ecs_dat_c(k).bill_to_country,''),
bill_to_city = NVL(tab_ib_ecs_dat_c(k).bill_to_city,''),
bill_to_location = NVL(tab_ib_ecs_dat_c(k).bill_to_location,''),
ship_to_customer_name=NVL(tab_ib_ecs_dat_c(k).ship_to_company_name,''),
ship_to_site_id = NVL(tab_ib_ecs_dat_c(k).ship_to_site_id,''),
ship_to_state =NVL(tab_ib_ecs_dat_c(k).ship_to_state,''),
ship_to_country=NVL(tab_ib_ecs_dat_c(k).ship_to_country,''),
ship_to_city =NVL(tab_ib_ecs_dat_c(k).ship_to_city,''),
ship_to_location= NVL(tab_ib_ecs_dat_c(k).ship_to_location,''),
ship_to_pin_code= NVL(tab_ib_ecs_dat_c(k).ship_to_pin_code,''),
bill_to_pin_code=NVL(tab_ib_ecs_dat_c(k).bill_to_pin_code,''),
ship_to_number=NVL(tab_ib_ecs_dat_c(k).ship_to_number,''),
bill_to_number= NVL(tab_ib_ecs_dat_c(k).bill_to_number,''),
customer_number= NVL(tab_ib_ecs_dat_c(k).customer_number,''),
ea_license_number= NVL(tab_ib_ecs_dat_c(k).ea_license_number,''),
ea_va_sales_order_number= NVL(tab_ib_ecs_dat_c(k).ea_va_sales_order_num,''),
parent_instance_id=NVL(tab_ib_parent_dat(i).instance_id,''),
parent_y_n='C',
process_flag='N',
error_code= NULL,
error_details= NULL,
request_id=v_request_id,
created_by=v_created_by,
creation_date= SYSDATE,
last_updated_by=v_created_by,
last_update_date=SYSDATE,
last_update_login= v_last_update_login,
eai_process_flag='N',
master_organization_name=NVL(tab_ib_ecs_dat_c(k).master_organization_name,''),
system_id= NVL(tab_ib_ecs_dat_c(k).system_id,''),
system_name= NVL(tab_ib_ecs_dat_c(k).system_name,''))
WHERE instance_id = NVL(tab_ib_ecs_dat_c(k).instance_id,'');
END IF; --V_COUNTPerforming a COUNT to check the existence of data is plain WRONG. Never do that. You need to be using MERGE statement. Like this. And possibly you should not be using collection and performing it with direct SQL.
merge into apps.xxcsi_trex_ob_ecs_mhm t1
using (
select nvl(tab_ib_ecs_dat_c(k).instance_id,'') instance_id
, nvl(tab_ib_ecs_dat_c(k).instance_number,'') instance_number
, nvl(tab_ib_ecs_dat_c(k).inventory_item_id,'') inventory_item_id
, nvl(tab_ib_ecs_dat_c(k).segment1,'') unit
, nvl(tab_ib_ecs_dat_c(k).description,'') unit_name
, nvl(tab_ib_ecs_dat_c(k).master_organization_id,'') master_organization_id
, nvl(tab_ib_ecs_dat_c(k).serial_number,'') serial_number
, nvl(tab_ib_ecs_dat_c(k).quantity,'') quantity
, nvl(tab_ib_ecs_dat_c(k).uom,'') uom
, nvl(tab_ib_ecs_dat_c(k).active_start_date,'') active_start_date
, nvl(tab_ib_ecs_dat_c(k).active_end_date,'') active_end_date
, nvl(tab_ib_ecs_dat_c(k).install_date,'') install_date
, nvl(tab_ib_ecs_dat_c(k).obj_version_num,'') object_version_number
, nvl(tab_ib_ecs_dat_c(k).last_vld_organization_id,'') last_vld_organization_id
, nvl(tab_ib_ecs_dat_c(k).pre_registration_location,'') pre_registration_location
, nvl(tab_ib_ecs_dat_c(k).order_header_id,'') order_header_id
, nvl(tab_ib_ecs_dat_c(k).order_number,'') order_number
, nvl(tab_ib_ecs_dat_c(k).order_line_id,'') order_line_id
, nvl(tab_ib_ecs_dat_c(k).actual_shipment_date,'') pre_registration_date
, nvl(tab_ib_ecs_dat_c(k).email_address,'') pre_registration_operator
, nvl(tab_ib_ecs_dat_c(k).bill_to_company_name,'') bill_to_customer_name
, nvl(tab_ib_ecs_dat_c(k).bill_to_site_id,'') bill_to_site_id
, nvl(tab_ib_ecs_dat_c(k).bill_to_state,'') bill_to_state
, nvl(tab_ib_ecs_dat_c(k).bill_to_country,'') bill_to_country
, nvl(tab_ib_ecs_dat_c(k).bill_to_city,'') bill_to_city
, nvl(tab_ib_ecs_dat_c(k).bill_to_location,'') bill_to_location
, nvl(tab_ib_ecs_dat_c(k).ship_to_company_name,'') ship_to_customer_name
, nvl(tab_ib_ecs_dat_c(k).ship_to_site_id,'') ship_to_site_id
, nvl(tab_ib_ecs_dat_c(k).ship_to_state,'') ship_to_state
, nvl(tab_ib_ecs_dat_c(k).ship_to_country,'') ship_to_country
, nvl(tab_ib_ecs_dat_c(k).ship_to_city,'') ship_to_city
, nvl(tab_ib_ecs_dat_c(k).ship_to_location,'') ship_to_location
, nvl(tab_ib_ecs_dat_c(k).ship_to_pin_code,'') ship_to_pin_code
, nvl(tab_ib_ecs_dat_c(k).bill_to_pin_code,'') bill_to_pin_code
, nvl(tab_ib_ecs_dat_c(k).ship_to_number,'') ship_to_number
, nvl(tab_ib_ecs_dat_c(k).bill_to_number,'') bill_to_number
, nvl(tab_ib_ecs_dat_c(k).customer_number,'') customer_number
, nvl(tab_ib_ecs_dat_c(k).ea_license_number,'') ea_license_number
, nvl(tab_ib_ecs_dat_c(k).ea_va_sales_order_num,'') ea_va_sales_order_number
, nvl(tab_ib_parent_dat(i).instance_id,'') parent_instance_id
, 'C' parent_y_n
, 'N' process_flag
, null error_code
, null error_details
, v_request_id request_id
, v_created_by created_by
, sysdate creation_date
, v_created_by last_updated_by
, sysdate last_update_date
, v_last_update_login last_update_login
, 'N' eai_process_flag
, nvl(tab_ib_ecs_dat_c(k).master_organization_name,'') master_organization_name
, nvl(tab_ib_ecs_dat_c(k).system_id,'') system_id
, nvl(tab_ib_ecs_dat_c(k).system_name,'') system_name
from dual
) t2
on (
t1.instance_id = t2.instance_id
when matched then
update
set instance_number = t2.instance_number
inventory_item_id = t2.inventory_item_id
unit = t2.unit
unit_name = t2.unit_name
master_organization_id = t2.master_organization_id
serial_number = t2.serial_number
quantity = t2.quantity
uom = t2.uom
active_start_date = t2.active_start_date
active_end_date = t2.active_end_date
install_date = t2.install_date
object_version_number = t2.object_version_number
last_vld_organization_id = t2.last_vld_organization_id
pre_registration_location = t2.pre_registration_location
order_header_id = t2.order_header_id
order_number = t2.order_number
order_line_id = t2.order_line_id
pre_registration_date = t2.pre_registration_date
pre_registration_operator = t2.pre_registration_operator
bill_to_customer_name = t2.bill_to_customer_name
bill_to_site_id = t2.bill_to_site_id
bill_to_state = t2.bill_to_state
bill_to_country = t2.bill_to_country
bill_to_city = t2.bill_to_city
bill_to_location = t2.bill_to_location
ship_to_customer_name = t2.ship_to_customer_name
ship_to_site_id = t2.ship_to_site_id
ship_to_state = t2.ship_to_state
ship_to_country = t2.ship_to_country
ship_to_city = t2.ship_to_city
ship_to_location = t2.ship_to_location
ship_to_pin_code = t2.ship_to_pin_code
bill_to_pin_code = t2.bill_to_pin_code
ship_to_number = t2.ship_to_number
bill_to_number = t2.bill_to_number
customer_number = t2.customer_number
ea_license_number = t2.ea_license_number
ea_va_sales_order_number = t2.ea_va_sales_order_number
parent_instance_id = t2.parent_instance_id
parent_y_n = t2.parent_y_n
process_flag = t2.process_flag
error_code = t2.error_code
error_details = t2.error_details
request_id = t2.request_id
created_by = t2.created_by
creation_date = t2.creation_date
last_updated_by = t2.last_updated_by
last_update_date = t2.last_update_date
last_update_login = t2.last_update_login
eai_process_flag = t2.eai_process_flag
master_organization_name = t2.master_organization_name
system_id = t2.system_id
system_name = t2.system_name
when not matched then
insert
instance_id
, instance_number
, inventory_item_id
, unit
, unit_name
, master_organization_id
, serial_number
, quantity
, uom
, active_start_date
, active_end_date
, install_date
, object_version_number
, last_vld_organization_id
, pre_registration_location
, order_header_id
, order_number
, order_line_id
, pre_registration_date
, pre_registration_operator
, bill_to_customer_name
, bill_to_site_id
, bill_to_state
, bill_to_country
, bill_to_city
, bill_to_location
, ship_to_customer_name
, ship_to_site_id
, ship_to_state
, ship_to_country
, ship_to_city
, ship_to_location
, ship_to_pin_code
, bill_to_pin_code
, ship_to_number
, bill_to_number
, customer_number
, ea_license_number
, ea_va_sales_order_number
, parent_instance_id
, parent_y_n
, process_flag
, error_code
, error_details
, request_id
, created_by
, creation_date
, last_updated_by
, last_update_date
, last_update_login
, eai_process_flag
, master_organization_name
, system_id
, system_name
values
t2.instance_id
, t2.instance_number
, t2.inventory_item_id
, t2.unit
, t2.unit_name
, t2.master_organization_id
, t2.serial_number
, t2.quantity
, t2.uom
, t2.active_start_date
, t2.active_end_date
, t2.install_date
, t2.object_version_number
, t2.last_vld_organization_id
, t2.pre_registration_location
, t2.order_header_id
, t2.order_number
, t2.order_line_id
, t2.pre_registration_date
, t2.pre_registration_operator
, t2.bill_to_customer_name
, t2.bill_to_site_id
, t2.bill_to_state
, t2.bill_to_country
, t2.bill_to_city
, t2.bill_to_location
, t2.ship_to_customer_name
, t2.ship_to_site_id
, t2.ship_to_state
, t2.ship_to_country
, t2.ship_to_city
, t2.ship_to_location
, t2.ship_to_pin_code
, t2.bill_to_pin_code
, t2.ship_to_number
, t2.bill_to_number
, t2.customer_number
, t2.ea_license_number
, t2.ea_va_sales_order_number
, t2.parent_instance_id
, t2.parent_y_n
, t2.process_flag
, t2.error_code
, t2.error_details
, t2.request_id
, t2.created_by
, t2.creation_date
, t2.last_updated_by
, t2.last_update_date
, t2.last_update_login
, t2.eai_process_flag
, t2.master_organization_name
, t2.system_id
, t2.system_name -
search criteria is not working in Responsible Group field in sap crm could you please help me this how to achieve.I have writen code on EH_ONSEARCH .as per below...what changess i need to do..and through partner function and adding the selection params please send the sample .
code. partner funtction - ZRG DATA :
DATA : lv_partner_fct type .
types: begin of ty_resp,
partner type but000-partner,
name_last type but000-name_last,
name_first type but000-name_first,
mc_name1 type but000-mc_name1,
mc_name2 type but000-mc_name2,
end of ty_resp.
DATA: lv_resp_bp type STANDARD TABLE OF ty_resp INITIAL SIZE 0,
lw_resp_bp type ty_resp.
IF lv_attr_name = 'Rgroup'.
lr_entity->get_property_as_value( EXPORTING iv_attr_name = if_crm_srqm_uiu_const=>gc_attr_low
IMPORTING ev_result = lv_low ).
IF lv_low IS INITIAL.
SELECT partner
name_last
name_first
mc_name1
mc_name2
FROM but000 INTO table lv_resp_bp
WHERE mc_name2 = lv_low and bu_group = '0010'.
loop at lv_resp_bp into lw_resp_bp.
lv_low = lw_resp_bp-mc_name2.
lr_query_service2->add_selection_param( iv_attr_name = 'Rgroup'
iv_sign = lv_sign
iv_option = lv_option
iv_low = lv_low
iv_high = lv_high ).
ENDLOOP.
if lv_partner_fct = 'ZRG'.
lr_entity = lr_iterator->get_next( ).
CONTINUE.
ENDIF.
lv_attr_name = 'BU_PARTNER'.
ENDIF.<b>You can acheive this .... first by creating the search help exit ... by creating the maintaince view then using it in the Creation of the search help </b> ...
see the link for attaching the view to the serach help .
<a href="http://">http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm</a>
reward points if it is usefull...
Girish -
I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.
So just to be clear, when you say "just bought" how long ago was that? Is it on this new iPhone that you had pictures, texts, etc that you want? Were you backing up to iCloud or onto iTunes?
This may not help for everything but if you go to iCloud.com and log in, are you able to find your pictures there? -
Please check for this account skype he is scammer
now he use skype call to me my mobile phone i'm IT Recruiter it's have more impact my occupation please delete and block this account i must delete my account . i must use skype for business but now i can not . now second time he send mail and use skype call to me i can not change my number mobile telephone i must use for business please help for me i must use skype only business .
Hello Jiraporn, how are you doing, hope you have been enjoying your self, you were playing smart on me right, i have to give you time to play on the game first and see if you win, but you never win, you give my skype id to people over there in Thailand to insult me and call me all kind of name, i just want to leave Malaysia to UK first before contact you, and i still have does copy of your sex video, i am going to give you 2 days for you to me the sum of 3000 Great British pounds, i know you will love to see some of you video honey, and your **bleep** so good, i hope the people of Thailand and the Movie porn industry will love to have you **bleep** some else on life, here are one of you video
Uploaded screen shot removed as personally identifiable information was not redacted.Hi, J3120,
Please refer to this instruction on how to remove your Skype account:
'Can I delete my Skype account?'
Then, please contact Skype customer service to file your request, as the article states.
Here is a link to the instruction on how to contact Skype Customer Service via their secure portal: Contact Customer Service
As you know you intend to contact Customer Service, skip past Step 2 of the instruction where several articles from the FAQ library will appear for you to review, and proceed to Step 3, Continue Support Request (the "button" appears at the lower right corner of the website page). You may also skip past in Step 4 where you will be referred back here to the Community; no need to do this as the Community is where you started.
You may transfer your contacts that you wish to keep from the old account to the new, however please note that you would have to request a refund of any credit and cancel subscriptions as neither of these can be transferred from one account to another.
Regards,
Elaine
Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often! -
Trying to update photoshop and repeatedly get error code U44M1P7, can you please help resolve this?
JJMack, Thanks for the info. Let this old man digest it and see if I can put the info into action. I'll give you a feedback. Thanks for your help in this matter. I am not a tech savvy person.
Rueben Rueben D. Olivas Home Ph: 1-671-969-2452
Cell Ph: 1-671-747-2453La Luz Photography
Email: [email protected]/Guam Firehouse Cook: http://guamfirehousecook.blogspot.com/BBQGuam: http://bbqguam.blogspot.com/My Photostream: http://ruebenolivas.megashot.net/photostream -
SQL experts please help for a query
I have following table1.
What query can give the result as given below, SQL experts please help on this.
TABLE1
Event DATETIME
in 2/JAN/2010
out 2/JAN/2010
in 13/JAN/2010
out 13/JAN/2010
in 5/JAN/2010
out 5/JAN/2010
RESULT REQUIRED FROM THE SQL QUERY
COL1_IN COL2_OUT
2/JAN/2010 2/JAN/2010
13/JAN/2010 13/JAN/2010
5/JAN/2010 5/JAN/2010I tried to help, but this puzzles me.
Why is this not returning pre-selected set of rows, why it's doing some merge join cartezian ?
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> select * from table1;
EVENT DATETIME
in 2/JAN/2010
out 2/JAN/2010
in 13/JAN/2010
out 13/JAN/2010
in 5/JAN/2010
out 5/JAN/2010
6 rows selected.
SQL> explain plan for
2 with a as
(select datetime from table1 where event='in'),
b as
(select datetime from table1 where event='out')
select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;
Explained.
SQL> set wrap off
SQL> set linesize 200
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 185132177
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 9 | 288 | 8 (0)| 00:00:01 |
| 1 | MERGE JOIN CARTESIAN| | 9 | 288 | 8 (0)| 00:00:01 |
|* 2 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 3 (0)| 00:00:01 |
| 3 | BUFFER SORT | | 3 | 48 | 5 (0)| 00:00:01 |
|* 4 | TABLE ACCESS FULL | TABLE1 | 3 | 48 | 2 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
2 - filter("EVENT"='in')
4 - filter("EVENT"='out')
Note
- dynamic sampling used for this statement
21 rows selected.
SQL> with a as
(select datetime from table1 where event='in'),
b as
(select datetime from table1 where event='out')
select a.datetime COL1_IN ,b.datetime COL2_OUT from a,b ;
COL1_IN COL2_OUT
2/JAN/2010 2/JAN/2010
2/JAN/2010 13/JAN/2010
2/JAN/2010 5/JAN/2010
13/JAN/2010 2/JAN/2010
13/JAN/2010 13/JAN/2010
13/JAN/2010 5/JAN/2010
5/JAN/2010 2/JAN/2010
5/JAN/2010 13/JAN/2010
5/JAN/2010 5/JAN/2010
9 rows selected.
SQL> -
My Canon MP620 appears to be connected, yet every time I try to print something, it says error. I have tried to unplug and track the error, but I cannot figure out why. Please help! this is such an inconvenience!
What Mac model? What Mac OS version?
FYI, this forum is for Apple hardware made before 1999. -
Hi. i updated my iphone 4s to iOS 7.0.4 but after that, wifi is not enabled. please help in this regard.
Apple has provided a useless workaround... [http://support.apple.com/kb/ts1559]
Else the only option you have is to fight with the Apple Store "geniuses" to get a free replacement for out of warranty 4S devices. Or try a third party repair like iFixit. The wifi chip might cost you 60-80$ but it is better than paying Apple 200$.
Overheating is the culprit in 4S devices. And its been getting worse with ever successive iOS 7 update. I think 7.0.4 was the final nail in the coffin.
They are not getting my money anymore.. I've had iPhones every since they launched... but no more. Feels like a dead investment after facing this issue. I can never sell my iPhone 4S even if I want to. There have been cases where users just sold their 4S devices, the new owner updated to 7.0.4, wifi stopped working and the seller had to give a refund.
I'm basically sitting on a 650$ white brick. Hmm... I wonder if white bricks sell higher than the standard red bricks
Guess it's time for you to sign up this ongoing campaign [https://www.change.org/petitions/apple-to-get-apple-to-replace-all-units-affecte d-negatively-by-the-update-of-ios7-or-patch-an-update-that-will-remedy-the-issue s-many-loyal-customers-are-experiencing#share]
TBH, I can't get a replacement because I am in India where 4S was never launched as an unlocked device and there are no Apple retail stores. Only resellers here like Vodafone/Reliance/Airtel. But if this petition can help the one who can take advantage of having retail stores around... why not? Sign up please. Thank You. -
My macbook Pro 13" 2013 has a mouse problem, its not moving naturally, and keeps on moving around like its dancing. Please help solve this!!
Go step by step and test.
1. Restart
2. Shut down the computer.
Clean the trackpad with moist not wet microfiber cloth.
System Preferences > Point & Click
Try turning off three finger dragging and then turning it on after testing.
3. Is there any Bluetooth device nearby with failing batteries? If so, replace the batteries.
4. Reset PRAM: http://support.apple.com/kb/PH14222
5. Reset SMC. http://support.apple.com/kb/HT3964
Choose the method for:
"Resetting SMC on portables with a battery you should not remove on your own".
6. Close all windows and quit all applications.
Click the Spotlight -the magnifying glass icon- in the menu bar. Enter Disk utility in the box.
Select Disk Utility from the drop down. When the Disk utility window opens up,
select Macintosh HD, then First Aid.
Click Repair Disk Permissions button.
Ignore the time remaining estimate.
Last 1 minute may take longer. -
Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.
Hello Priyanks,
I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
iOS: Troubleshooting car stereo connections
http://support.apple.com/kb/TS3581
Thank you for using Apple Support Communities.
Best,
Sheila M. -
My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?
Following the fix here worked for me:
https://discussions.apple.com/message/15680566#15680566
except my plist file was in ~/Library instead of /Library.
-Scott -
When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.
Me too. I try to verify and i get the same message.
I've created 3 alternate e-mail addresses and tried creating new accounts.
Same Result!
This is bullsh!t. How the **** can all 4 of my attempts result in the same freakin error??? -
Require a Message mapping for this Logic.
Hi Experts,
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Thanq very much in advance..
Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PMHi Prashanth,
Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
formatByExample>collapseContext>SplitByEachValue-->Recv_Date
FormatByExample:
input1:resulrOfSortByKey
input2:concatination>removecontext>sort-->SplitByValuChange
sortByKey:
input1:concatination-->removecontext
input2:date-->removecontext
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
formatByExample>sum>Recv_Quantity
FormatByExample:
input1:sortByKey
input2:concatination>removecontext>sort-->SplitByValueChange
SortByKey:
input1:concatination-->removecontext
input2:Quantity-->removeContext
Regards,
Priyanka.
Maybe you are looking for
-
Java expression - hot express ArrayIndexOutOfBounds in If Statement
Hi ! I would like to know how I can express the following correctly: Testcode - just to show what i mean: int[][] testArray = whatever assignments here if (testArray[line][row] != ArrayIndexOutOfBoundsException) .... do stuff here... }As obvious I ba
-
If A VERIZON AGENT does not respond and fix this then I am switching back to COMCAST
I pay OVER TWO HUNDRED DOLLARS A MONTH for all these channels and every weekend when I have my only two days off to relax and watch these channels (that I pay an arm and a leg for!) ARE NOT WORKING. I have been taking pictures for MONTHS of the error
-
How can i check if a procedure exists in a certain database version
So today i became really frustrated after noticing that the Oracle SQL version on some computer I needed to work on was 10.1. The problem with that was that I needed a procedure called "xmlserialize". I browsed the documentation for it, but I didn't
-
How to get Production Order wise Actual Values
Dear CO Experts, How to get Actual Values (Raw Material Issue, Activity Confirmations & OH Calculations & Goods Receipts from Production) each Production Order wise ? My Scenario is Product Cost Collectors (PCC) with Production Orders. If we select
-
CreateOsCol error: SCS Java Add-In installation to ABAP on ERP 6.0 SR3
Hi there, I got an error while installing SCS Java Add-in to ABAP on ERP 6.0 SR3. Do you have any ideas for this issue? sapinst.log INFO 2010-06-04 16:54:35.109 Execute step createOsCol of component |NW_Addin_SCS|ind|ind|ind|ind|0|0|NW_SCS_Instance|i