Question about the transition from string values to the Partition clause in a merge statement

Hi all

I use the code to update the data of specific secondary partition using oracle merge statements below.

I'm getting the name of the secondary partition and pass this string to the secondary partition clause.

The Merge statement is a failure, indicating that the specified secondary partition does not exist. But the partition under do exists for the table.

We use a server Oracle 11 GR 2.

Here is the code I use to fill in the data.

declare
ln_min_batchkey PLS_INTEGER;
ln_max_batchkey PLS_INTEGER;
lv_partition_name VARCHAR2 (32767).
lv_subpartition_name VARCHAR2 (32767).
Start

FOR m1 IN (SELECT (year_val + 1) AS year_val, year_val AS orig_year_val)
FROM (SELECT DISTINCT
To_char (batch_create_dt, 'YYYY') year_val
OF stores_comm_mob_sub_temp
ORDER BY 1)
ORDER BY year_val)
LOOP
lv_partition_name: =.
() scmsa_handset_mobility_data_build.fn_get_partition_name
nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
p_search_string = > m1.year_val);

FOR m2
IN (SELECT DISTINCT
'M' || To_char (batch_create_dt, 'MM') AS month_val
OF stores_comm_mob_sub_temp
WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val)
LOOP
lv_subpartition_name: =.
() scmsa_handset_mobility_data_build.fn_get_subpartition_name
nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
p_partition_name = > lv_partition_name,
p_search_string = > m2.month_val);

DBMS_OUTPUT. Put_line (' lv_subpartition_name = > ' | lv_subpartition_name |' and lv_partition_name = > ' | lv_partition_name);

IF lv_subpartition_name IS NULL
THEN
DBMS_OUTPUT. Put_line ("to the INTERIOR of FI = > ' |") M2.month_val);
INSERT INTO STORES_COMM_MOB_SUB_INFO (T1)
T1.ntlogin,
T1.first_name,
T1.last_name,
T1.job_title,
T1.store_id,
T1.batch_create_dt)
SELECT t2.ntlogin,
T2.first_name,
T2.last_name,
T2.job_title,
T2.store_id,
T2.batch_create_dt
OF stores_comm_mob_sub_temp t2
WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val
AND'M '. To_char (batch_create_dt, 'MM') =
M2.month_val;
ELSIF lv_subpartition_name IS NOT NULL
THEN
DBMS_OUTPUT. Put_line (' INSIDE ELSIF = > ' | m2.month_val);
MERGE (SELECT *)
OF stores_comm_mob_sub_info
SUBPARTITION (lv_subpartition_name)) T1
USING (SELECT *)
OF stores_comm_mob_sub_temp
WHERE TO_CHAR (batch_create_dt, 'YYYY') =
M1.orig_year_val
AND'M '. To_char (batch_create_dt, 'MM') =
M2.month_val) T2
WE (T1.store_id = T2.store_id
AND T1.ntlogin = T2.ntlogin)
WHEN MATCHED
THEN
GAME UPDATE
T1.postpaid_totalqty =
(NVL (t1.postpaid_totalqty, 0))
(+ NVL (t2.postpaid_totalqty, 0));
T1.sales_transaction_dt =
LARGEST)
NVL (t1.sales_transaction_dt,
T2.sales_transaction_dt),
NVL (t2.sales_transaction_dt,
T1.sales_transaction_dt)),
T1.batch_create_dt =
LARGEST)
NVL (t1.batch_create_dt, t2.batch_create_dt),
NVL (t2.batch_create_dt, t1.batch_create_dt))
WHEN NOT MATCHED
THEN
INSERT (t1.ntlogin,
T1.first_name,
T1.last_name,
T1.job_title,
T1.store_id,
T1.batch_create_dt)
VALUES (t2.ntlogin,
T2.first_name,
T2.last_name,
T2.job_title,
T2.store_id,
T2.batch_create_dt);
END IF;
END LOOP;
END LOOP;

COMMIT;

end;
/



Really appreciate your input here.

Thank you
MK.

Hello

You can use "immediate execution" what works.

Thank you

Tags: Database

Similar Questions

  • Satellite Pro C660 - 21(d): question about the partitions on the HARD disk

    Hello

    I just started using my new satellite pro c660 - 21 d

    My office has drive c, d, u, s
    C either windows 7, Vista D
    The drive U is 342 meg in size

    I didn't have the disk in two 230 gig drive so thoughtless narrowed C drive of 70 GB and D drive with 10 gig (it's the primary recovery partition

    I have now two empty partitions of 170 Gig (from c drive)
    and 214 Gig (from d drive)
    But windows will only allow me to add one as a disc of the user
    He says may not have more than 4

    The reason for being there is a partition of Active recovery without letter.

    I can't unshrink drive C or drive D then I went with 170 GB of unused space.

    I guess that a solution would be to lose the data disk 10 gig that contains the recovery software but then I don't have a backup.

    Suggestions as to what I could do to work around this problem.

    I am now under the Create recovery disks (2 of them) so maybe I could remove one of the partitions after.

    I don't know why he answered instead of edition, but if the recovery disc creation complete with no errors, I can remove the hard drive?

  • Question about the partitions on my HARD drive

    My hard drive is divided as follows:

    (1) 1.46 GB recovery Active
    (2) 455 GB C: primary partition
    (3) partition primary gb 9,27

    If the partition of 1.46 GB ensures recovery system (such tiny disc?), what the gb 9.27 partition for?
    Please?

    Hello

    Hmm, I think that 3) gb 9.27 primary partition contains also the Toshiba recovery system files.
    The point is that you can create the recovery disk using the preinstalled Toshiba Recovery creator tool. This tool could create image contain the Win 7 32 bit and 64 bit OS.
    I think that the 10 GB are necessary so that

    What do you think of this?

  • Question about the partitions on satellite Pro L300-164

    I have a Toshiba Satellite Pro L300 and it came with vista on the 1 74 GB partition and a data partition 73 GB but it has a folder called HARD drive recovery, but I want Vista to all of the 140 gb and have the recovery partition on a small partition of 4 GB for HARD drive recovery.

    Is this possible without mucking up the HARD drive recovery?

    No, is not possible, but that you can and should do is create recovery DVDs.
    After doing this, you can remove this folder and organize partition how you want it to be.
    Remember that you will lose the ability to install the operating system from the disk using F8 and repair my computer option.

    If a problem occurs, you can install Vista using this recovery DVDs.
    Please note: after installation of recovery, you will have the same structure divides again and all your saved data will be gone.

  • A question about the insertion of the localTimeStamp returned the value into a timestamp with time zone column

    Hello

    Oracle version: Enterprise Edition Release 12.1.0.1.0 - 64 bit

    OS: CentOS 4.6 X86_64                  

    I have a question about the localTimeStamp function. According to the documentation for this function is
    the same thing as current_TimeStamp except that the returned value does not include the time zone.

    Consider the following example:

    SQL > create table tmptab (colval timestamp with time zone not null);

    Table created.

    SQL > insert into tmptab (colval) values (localTimeStamp);

    1 line of creation.

    SQL > select t1.colval, tmptab from t1;

    COLVAL

    ---------------------------------------------------------------------------

    24 JANUARY 14 09.45.42.253732 H + 01:00

    SQL >

    Why introduce the foregoing did not fail? the data type of the column in my table colval expects a timestamp with time zone

    during each which inserts as I understand (correct me if I'm wrong) is not provided by the localTimeStamp function.

    Could someone kindly tell me what I misunderstood?

    Thanks in advance,

    dariyoosh wrote:

    Hello

    Oracle version: Enterprise Edition Release 12.1.0.1.0 - 64 bit

    OS: CentOS 4.6 X86_64                  

    I have a question about the localTimeStamp function. According to the documentation for this function is
    the same thing as current_TimeStamp except that the returned value does not include the time zone.

    Consider the following example:

    SQL > create table tmptab (colval timestamp with time zone not null);

    Table created.

    SQL > insert into tmptab (colval) values (localTimeStamp);

    1 line of creation.

    SQL > select t1.colval, tmptab from t1;

    COLVAL

    ---------------------------------------------------------------------------

    24 JANUARY 14 09.45.42.253732 H + 01:00

    SQL >

    Why introduce the foregoing did not fail? the data type of the column in my table colval expects a timestamp with time zone

    during each which inserts as I understand (correct me if I'm wrong) is not provided by the localTimeStamp function.

    Could someone kindly tell me what I misunderstood?

    Thanks in advance,

    Then, when you do

    create table t (neck DATE);

    Insert into t (to_date ('1st January 2014', ' mon-dd-yyyy "");)

    Are you surprised that it works? After all a DATE column contains a time component, you do not provide: but he

    works and gives you 00:00:00 as the component "hour".

    Similarly, the timezone component is being developed to automatically with, I think, time zone of your system.

  • Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    AdobeTomFaith

    If your program is Photoshop Elements, then you have posted in the wrong forum. Some how your son got posted in the Forum Adobe Premiere elements (video editing). Please re-post your thread in the Adobe Photoshop elements Forum.

    Photoshop Elements

    Wherever your son is, please include Adobe Photoshop Elements version and operating system and the description of the installation problem (error messages, stage of failure, etc.)

    Support Adobe seems to be limited to Adobe cat and is classically limited to the current version which is 13. Then, you the best avenue to success is likely to be through the Adobe Photoshop elements Forum. But that shouldn't stop you trying to determine what kind of support you can get from Adobe cat on your question.

    I would offer this link that is specific for Adobe Chat download and installation

    Contact the customer service (this is not the same destination as shown in a previous post in your thread)

    This link is specifically designed for

    Photoshop Elements

    Download, installation, setting up

    Download and installation

    Panel discussion

    (18:00 - Friday 7 pm Sunday)

    Thank you.

    RTA

  • Exam question-value of the point and unanswered questions about the VCP4 exam?

    Hello

    I have a few questions about the scoring to secure Channel 4 review system:

    1. All the questions on the exam are weighted the same?

    2. Is there a penalty for unanswered questions?  In other words, is it better to not answer a question, if you are sure that you do not know the answer, or take a guess if it comes down to it?

    Thank you very much

    Bryan

    Not responding not to an element, it is the same thing that answer wrongly as far as scoring is concerned, so it makes sense to guess rather than leave the question unanswered.

    With respect to the weighting, all elements have the same weight in the VCP exam, but some items do not count against the overall score.  These "dosed" items continually change and are chosen at random.  We insert elements assayed to determine the validity of the element until it became a party has received from the real exam.  If however, you want to treat each item with an equal amount of importance.

    Hope this helps,

    Jon C. Hall

    Technical developer certification

    [email protected]

    2077 Loma Linda way n., Clearwater, FL 33763

    727-446-8430 Office

    727-460-8448 Mobile

    Fax 702-554-3727

  • Question about the differences in commands

    Hey guys -.

    I just had a few questions about the differences between orders that seem to perform the same function.  Can you let me know if an order is more preferable to the other and what the difference is.  I would really appreciate it as it I currently practice some INE laboratories and I see that orders change from lab to lab.  Thanks advance!

    1. When you write a static NAT for specific host 1 - is - this important if I understand the 32 subnet?

    EX: static (inside, outside) 1.1.1.1, 2.2.2.2 VS static (inside, outside) 1.1.1.1 2.2.2.2 netmask 255.255.255.255

    2. when I'm setting up a router as a CA server and it is necessary to "export" the key, whatever my method of exporting the key?  If so, in which method call for which solution?

    EX: key export cryptographic rsa ciscox pem URL nvram: cisco VS. exporting key 3des cryptographic ciscox pem 3des rsa terminal cisco

    3. If I have to mark a packet with a DSCP of X value, matter if I use the 'set dscp' VS 'set ip dscp?  If so, what is the difference?

    FXY

    Policy-map X

    class X

    the dscp X value

    VS

    Policy-map X

    class X

    X ip dscp value

    I guess pertaining to 2, if i was speaking in terms of from a cisco router to another cisco router - would terminal be acceptable?

    Yes, the "Import cryptographic key" command can take a url and also from the terminal entrance. In this terminal case wil is much easier.

    --
    Don't stop once you have upgraded your network! Improve the world by lending money to low-income workers:
    http://www.Kiva.org/invitedBy/karsteni

  • Questions about the accordion component

    I have a few questions about the use of the accordion component:

    1. when my accordion is created it shows the first container child, this child is created at this time and if you go to another child it is also created (but only until it is first accesed). The thing in the first child, I need to access the properties and components located in other children, so it marks an exception to NULL, because I am trying to access the properties or the components that have not yet been created, but I really need to access and transmit values to other children containers at the moment (without their first navigation) , then it is possible to create all the children while creating the accordion although I would'nt need to navigate through its children to create them?

    2. is it possible to disable the functions of click of an accordion, so the only way to change bewteen her children is programmatically? I mean, you can click the buttons on the accordion to navigate through his children, but you can also do this programmatically by using the selectedIndex property, so I'll try to disable accordion buttons so the only way to navigate is programmatically.

    All the ideas of these two questions?

    You can use creationPolicy = "all" on the accordion and it will create all children, not only the first condition. The downside of this is that your application will have a little more time to start. Consider this:

    Child 2:

    If you try to set child2.input = 'something', a better solution would be to use data binding:

    Child 2:
    [Bindable] public var inputValue:String;

    Now you can do: child2.inputValue = 'something '; If the user interface of child2 have not been created, the inputValue parameter has without adverse consequences; as soon as the 2 child controls are created, data binding will assign the value. If child 2 has already been created, the data binding will also affect the value.

    You can disable the click event to the accordion by intercept and stop its spread, but you must do this in ActionScript, you can't do this in MXML.

    myAccordion.addEventListener ('change', accHandler, true); true means to use the capture phase

    private void accHandler (event:flash.events.Event): void
    {
    If (event.target is mx.containers.accordionClasses.AccordionHeader) {}
    Event.stopImmediatePropagation;
    }
    }

    The idea is that intercept you the click event, as it moves down through the components (capture phase). If the target of the event is an AccordionHeader, prevent you the event to go further - it is to reach the AccordionHeader itself.

    You can put this handler on accordion or its parent up to the Application.

  • Questions about the stores in iProcurement

    All,

    I have a few questions about the implementation of iProcurement stores-

    1 oracle comes seeded with 2 stores "Backend" and "Exchange.Oracle.com. We do not have the use of these stores. I don't see an option to turn them off. Is it advisable to delete them? They occupy unnecessary space and are seen first. I read this on Metalink Note ID 429470.1 - "NOTE: while the value can be changed, it is highly recommended to not under any circumstances ever remove"Main store"page stores to manage content in iProcurement catalog administrator responsibility.» Do not know why.

    2. we have a Punchout for Dell U.S. catalog store and a catalog of information for Dell International. Buyers of Dell are iProcurement to each punchout to place their orders from Dell for the USA (shopping cart returns to iProcurement) - or - just use the store Dell International to go to an external URL and place their orders here (who do not return to iProcurement). What we see is - when the user clicks on the icon Dell us, it is taken directly to the URL of the PunchOut of Dell, but when he clicks on the Dell International icon, he was first taken to the list of catalogs available to the store (only 1 available catalog) and the user must then click again on the link Dell International. Is there a way to configure the Dell International icon to behave the way behaves in the Punchout icon - i.e. directly take the user to the Dell page without a need to show the list of catalogs.

    Hey,.
    To answer your Questions
    1. you can always delete those either if you want to... The reason why the link Meta Notes say not only not to delete the main store is
    i. because main store has all of the Local content in iProcurement (i.e. If you have any installation of items in the inventory you and them Module iProcurement Enabled (IE can be purchased at iProcurement) and any other article of local catalogues/categories Loaded using the BULK LOADING in iProcurement is also removed.)
    II. you can always delete the information Exchange Oracle store if you do not use.
    I would advise so do not remove the main store. Instead, you can change the sequence of the display of the stores you iProcurement Page.
    Browsing ==> Internet shopping Catalog Admin (RESP) ==> eContent crib ==> content management ==> stores ==> press the update sequence and make sure that the sequence number for main is superior to any other store so that the hand store falls last in the House of iProcurement Page

    2.i don't think that there is no option to do this. but you can always open an SR with Oracle about it and ask this question\

    hope that answers your Question.

    Thank you
    SANTU

  • A few questions about the difference between the Satellite P70, L70, S70

    Hello, I have a lot of questions about the P70, L70, S70 series that come with a 1920 x 1080 panel.

    (1) what are the differences between the L70 and S70 series? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    (2) P70, L70, S70 doesn't support a 2nd HARD drive or it's just the P70 series that support?

    (3) all the three (P70, L70, S70 series) come with the same TFT panels?

    (4) of the above series, which supports mSata?

    (5) all the model of each series are delivered with support from mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?

    (6) all the foregoing, are delivered with a S - ATA II or III S - ATA interface?

    (7) who is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.

    Thank you in advance.

    > (1) what are the differences between the series L70 and S70? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    What models Sat L70 and S70 do you mean exactly? There are different L70-xxx-xxx and S70 models on the market that supports different hardware specifications.

    (> S70 2) P70, L70, support a 2nd drive HARD or is - it just the series P70 that support?
    As you can see in this [Sam P70 HDD replacement document, | http://aps2.toshiba-tro.de/kb0/CRU3903II0000R01.htm] the P70 series supports the 2nd drive Bay HARD, BUT even if there is a 2nd HARD drive Bay, this does not mean that you can use the 2nd HARD drive. In the case where the 2nd HARD drive Bay are equipped with HARD drive connector, you can use the 2nd HARD drive

    I also found the [Sam L70/S70 HDD replacement | http://aps2.toshiba-tro.de/kb0/CRU3703HG0000R01.htm] the document on the Toshiba page and there I see this 2nd HARD drive Bay is not available

    (> 3) all three (P70, L70, S70 series) come with the same TFT panels?
    See point 1). Different P70, L70, S70 models were equipped with different material parts.

    (> 4) of the series above, which takes in charge mSata?
    As far as I know that some P70 models are equipped with an mSATA SSD of 256 GB.

    (> 5) do all the model of each series are delivered with support mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?
    See point 4) not all models supports the same hardware specifications

    (> 6) all of the above, come with a S - ATA II or III S - ATA interface?
    I don t think that SATA III is supported. I guess it would be SATA II

    (> 7) which is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.
    Not easy to answer because there are too many models released in Europea.
    And not all models are available in each country. So I guess you will have to look for the models that have been released in your country.

  • Question about the recovery partition

    Hello.

    I have a question about the recovery of HARD drive partition.

    If I do the operation to clear the hard disk option in the wizard it will remove * all * or it will keep my partition recovery in this way I can come back later. I want to know because I would like to put on a different OS.

    I know he said he would, but caution in the PDF, I found it says that on a normal recovery too (that he would remove each partition) and I'm a little confused about how the recovery actually worked.

    Thank you.

    Hey Buddy,

    To be honest I n don't know what you mean exactly with this option to erase.

    In General, Toshiba Recovery disk will wipe your entire HDD to restore factory settings correctly. This means that if you start from that disk and follow the instructions on the screen, everything will be removed.

    In addition, the recovery disk doesn t create a recovery partition. It is not available. Disk copy just the files on the second partition in folder HDDrecovery to start an installation of HARD drive recovery.

  • A few questions about the Satellite A100 PSAANE

    Hi friends,

    I have a Toshiba Satellite A 100 - PSAANE with Vista Home Basic preinstalled in it.
    Now, I have a few questions... I mention below: -.

    (1) if I want to format my laptop, I need a CD to install for Vista Home basic... then I don't have this Toshiba CD when I bought the laptop. So how do? question: How can I format it?

    (2) can I change my Vista Home Basic to windows XP? I think it's much faster than this one. is it advisable?

    (3) I have a GB of RAM in the laptop. Increase the RAM? I think that my laptop has become to slow down. is it advisable?

    (4) and on my screen, everytime I try to change my profile screen to windows Classic view, my screen begins to blink. and after a while, the screen turns off. So I can't change that. I put the color scheme of windows vista only. What to do about that?

    Please help me friends. Thanks in advance.

    Kind regards
    Perkins

    Hello

    Here, a few questions about the number:

    (1) usually, you should get the Vista Toshiba Recovery DVD. If you didn t receive this DVD then you can order it here https://backupmedia.toshiba.eu/landing.aspx or you could install the disc of Microsoft Vista.

    (2) of course, you can do this. I think that Win XP drivers can be downloaded from the Toshiba driver page.

    (3) Yes, you can upgrade the RAM. For more information, see your manual or search on this forum for similar topics

    (4) maybe it s associated with the graphics driver. Check if you can update. I would recommend additional check if you are using the latest version of the BIOS

    Welcome them

  • I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I go back in just the Quicken file and restore it until I downloaded the update do I have to restore the entire

    I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I come back in all the Quicken file and restore from time Machine before I downloaded the update to do, I need to restore the entire computer?

    Yes, you can just restore this file or application. Use Time Machine to back up or restore your Mac - Apple Support

  • Questions about the Windows Feedback program Fullfillment

    When will I know if my fullfillment of windows feedback program is over, that I have installed on my PC?

    Hello mpic16,

    If you have questions about the Windows feedback program, you will need to respond here.
    https://WFP.Microsoft.com/welcome.aspx

    You can send an email to: * e-mail address is removed from the privacy *.

    They would be better able to answer your questions and concerns.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

Maybe you are looking for