To call the function in sql and script call

Hello

I'll have a .sql script that returns the name of the partition and I need to run alter table Exchange partition something like this

get_part. SQL

COLUMN file_name new_value by sub_script_col

accept the start_date char prompt arguments ' input start (exact): '

accept the end_date char prompt "enter end date (exact): '"

create or replace function get_part_name (p_date in date)

VARCHAR2 is back

date d;

RETP varchar2 (30);

spirit date: = to_date('4444-01-01','yyyy-mm-dd');

Str varchar2 (32000);

cursor c is

Select high_value, nom_partition p

of all_tab_partitions

where table_name = 'TO_TEHBLNC ';

Start

for r in c loop

Str: = r.high_value;

run immediately 'select'. Str |' double ' in d;

If p_date < d and d, then the spirit

RETP: = r.p;

spirit: = d;

end if;

end loop;

return pter;

end;

Select get_part_name ('& 1') twice;

ACCEPT user_yn PROMPT ' do you want to partion with < partition name > table? (Y, N) : "

SELECT THE CHECK BOX

WHEN TOP (LTRIM (' & user_yn')) AS 'y %. "

THEN "insert_partition".

ELSE 'do_nothing.

END AS sub_script_col

DOUBLE;

@ &sub_script_col < partition_name >

sub_script_col. SQL

ALTER TABLE to_tehblnc

SWAP PARTITION < name patition >

WITH TABLE T1

WITHOUT VALIDATION

UPDATE GLOBAL INDEXES;

I need to call once again for the sub_script.sql based on start_date and end_date, for example 1st January 2015 and January 5, 2015 I must first get the parition name and proceed to modify the table with that respective partition name returned by the function, so that it will be 5 times alter the table to swap partition

I'll have a .sql script that returns the name of the partition and I need to run alter table Exchange partition

This is just a continuation of your other thread

For the name of the partition in the partition range table

As I said it you do not have to know the name of the partition to make an EXCHANGE. I gave you an example in this other thread.

ACCEPT user_yn PROMPT ' do you want the table to partition with ? (Y, N) : "

That makes no sense at all. You cannot partition a table that is already partitioned. If there is a name for the partition and then the table is partitioned already - then ask why to partition?

ALTER TABLE to_tehblnc

SWAP PARTITION

WITH TABLE T1

WITHOUT VALIDATION

UPDATE GLOBAL INDEXES;

I need to call once again for the sub_script.sql based on start_date and end_date, for example 1st January 2015 and January 5, 2015 I must first get the parition name and proceed to modify the table with that respective partition name returned by the function, so that it will be 5 times alter the table to swap partition

No - you don't have. Just use the code example I provided in your other thread. You don't need to know the name of the partition and use dynamic sql statements to make the Exchange.

Just use PARTITION syntax as shown in the example.

Do things the EASY way. Your code and the script is totally useless.

Tags: Database

Similar Questions

  • Is function like the function of date and time picker in the ICB 8.5?

    I need the function as "date and time picker control" used in activeX, but my operating system (windows 7 Bits without office software) is not the «Microsoft date controller» and time picker I am looking article in the internet which mention this register the MSComctl2.ocx in the windows\system32, but he could not operator in my operating system (it's not allow to save the controller). Help me, please.

    Already, I discovered that the problem on the service of DTP in the 64-bit Windows 7 could not used. Because, the DTP is 32 bits, it should use the administrator to register the 'mscomct2.ocx file' which must be replace in the % windows/SysWOW64 and used the 'mscomct2.ocx regsvr32.exe"in console windows.

  • Help me I have Windows XP. Would be, or could you please tell me what the function keys are and how I could use them?

    I have Windows XP. Would be, or could you please tell me what the function keys are and how I could use them?

    I have Windows XP. Would be, or could you please tell me what the function keys are and how I could use them?

    Function keys are used to things dirrent, depending on whether you are simply Windows or a program of work, and if you work in a program, what program it is?

    This search through the documentation of programs you use. Read also here: http://www.internetfixes.com/definitions/IF01424.htm

  • How can I recover the functions drag horizontal and vertical to center the portions of the image being developed? [was: Question]

    How can I recover the functions drag horizontal and vertical to center the portions of the image being developed?

    1 - question double deleted

    2 the name of the program you are using then a moderator may move this message to the correct program forum

    This forum Cloud is not on the program problem... help a program would be Photoshop Lighroom or Muse or?

  • DreamWeaver - has access to the customer server languages and scripts?

    DreamWeaver - has access to the customer server languages and scripts?

    Thanks to anyone who responds to this in advance.

    If the access you want to say, "can I write a JavaScript or PHP with Dreamweaver code?  Yes.

    If you mean something else, please provide details.

    Nancy O.

  • How to import the function of zoom and scroll on the bar chart

    Hello
    I want to import function of zoom and scroll in my diagram bar (application of web fiusion). I have a lot of data and I need zoom and scroll.
    I saw something on the oracle with the creation of bean managed database and the method call to a zoom and scrol earpiece but I don't know how to create a managed bean then maybe someone can help me?
    I am a starter and I need a detailed answer, thanks :)

    If you need a detailed answer, you can ask in the forum, which is not this one.

  • When you modify a form in the DC or Pro Player I can enter text etc., save, close, and return later to change it. However, once I use the function "Fill &amp; Sign" and save the document, it locks the file and all other fields are not editable. Is there a

    Hi guys,.

    When you type information in a form in the DC or Pro Player I can enter text with fields of text etc and then save, close and return later to change the form. However once I use the function "Fill & Sign" to sign the document, and then save, it locks the file and all other fields become editable. Is there a way around this to remove this feature where it becomes locked and instead allows me to change the form after a signature is applied and saved. All the security properties of the form are on 'admitted', there is no restriction. Even though the document is locked all the properties remain still as 'authorized '.

    The signing is FINAL.  You cannot sign a PDF paper advance. Complete and save, do not sign.

  • -What is the function of SQL or API Availble in SQL Toolkit 2.2 connection (Urgent)?

    Hello

    I have to build an application using LabWindows 2010 and SQL Toolkit 2.2. Is there any function or dll or api availble so that I do not want to link in the ODBC Control Panel.?

    Concerning

    Umer


  • Display! How can I display the function split vertically and not horizontally?

    I would like to split function to view the code on the left and right live view. Right now it shows only the code down and live view on the top. How can I configure it so that I can split vertically view? Please, I really need help with this. Thank you

    1. Make sure that you are in split view (Code from Split or split design/Live view).

    2. To split vertically to view, choose View > split vertically. To split the view horizontally, deselect view > split vertically.

    Working in the Document window

  • Cannot set HScrollBar &amp; quot; Scroll &amp; quot; variable inside the function in &amp; lt; MX:script &amp; gt;

    Why can I not pay the scrolling feature for a bar scrolling from a function. It can be hard coded and not dynamically set. This makes it difficult to make the scroll bars on the fly.

    I want to do the following:
    var myBar:HScrollBar = new HScrollBar();
    myBar.scroll = "myFunction (); « ;

    BUIT, it is said that myBar doesn't have a variable named scroll. What is the problem?

    Hi, Creo, 'scroll' is not a property of the ScrollBar class, this is an event. To do what you're trying to do, you add a listener of events, something like this:

    Import mx.events.ScrollEvent;
    var myBar:HScrollBar = new HScrollBar;
    myBar.addEventListener (ScrollEvent.SCROLL, myFunction);

    I hope this helps. -Bruce

  • Problem for all Microsoft products that contains the functionality to search and address bar replace Outlook.

    I am facing a constant problem with IE 8, Control Panel, Windows Explorer and any other product that has an address bar. The problem is this: as soon as I finish the login sequence, so that on my desk, the content of the history of the address bar starts flashing quickly, even if I did not open IE or any other application. Once I open IE 8, control panel or any oher application that contains an address, historical content bar drop-down startup flashes quickly and blocks the page or the screen, it is impossible to execute any action/activity. Then, without making that one thing, the behavior stops for a while and the app works normally. Then it would start again.

    At the same time, when I open an email in Outlook, similar behavior takes place with search replace automatically shooting upward and find what drop-down box flashing quickly and my lock screen. I had to communicate with McAfee and had done everyhting in the perspective of the virus without result detection/removal.

    No matter what thoughs on what could cause this problem. Thanks for any help/comments/suggestions, that you can provide.

    Try updateing your graphics driver from your PC manufacturer or the manufacturer of graphics so a generic PC. Don't use winupdate for pilots

  • How can access Windows Management Instrumentation Win32_Processor and Win32_OperatingSystem to re-enable the functionality of WMI and other features such as system information?

    Running Windows Home Premium SP2.

    I stumbled upon the answer to

    http://social.msdn.Microsoft.com/forums/en-us/SQLExpress/thread/b924e835-b835-4883-8323-8b3600dfb0c1/

    of greggnlisa.

    -Goto the start menu and LOCATE your command prompt (should be under the accessories section).
    -Right-click on it and select "Run as Administrator".
    -At the command prompt, type the following: net localgroup "Directors" "NT Authority\Service" / Add

    -Then press ENTER.

    -Reboot and you're done.

    I do not understand how it worked, but it took me several weeks to locate.

  • The functions of horizontal and vertical touchpad scrolling mouse stop working after the passage of the users.

    Restarting the computer solves the problem, but the problem occurs every time that I have change user.  Deactivation and reset the settings do not appear to address them.  Any suggestions?  Thank you!

    In addition, I note that demand, ApntEx.exe... too bad.  I had to put an end to this process and run it again.  Maybe this will help someone else.

    Now it's working.  I had to go to (ctrl + shift + ESC) Task Manager and end the process, ApntEx.exe.  Then I went to File-> new task (run...) and type "ApntEx.exe" in the box and press ENTER.

  • (Redirected) my touchpad lost the function of shortcut and right click menu

    my new laptop Win8.1 XPS15 9530 has been used only for a few weeks. There are a few small problems really a puzzle to me. problem of headaches the most is the button of the touchpad does not work since yesterday, all that I have configured the Dell Touchpad software. I searched on the froum and Dell support Web site, there are question existence for another Dell laptop. hope someone can help me solve this problem. Thank you.

    PS, I used Sony and Toshiba before, there is no such problems. It is the question of the quality of Dell or Win8?

    There are 2 times, WiFi can not connect.

    As you have a laptop, better make this laptop in the computer Forum post here:

    http://en.community.Dell.com/support-forums/laptop/default.aspx

    Bev.

  • Questions about the functionality of callback and SMS?


    You must first create a background application. Therefore extend the Application class. Then, you already said you use persistence. DateTimeUtilities comes in very handy when handling / comparison of DateTime. Then implement the RealTimeClockListener that is raised every minute to check if the date is a specific date in your persistence. Or you can use TimerTask and trigger every hour or every 24 hours. To warn the user of your application to background:

    synchronized(Application.getEventLock()){    UiEngine ui = Ui.getUiEngine();
        Screen screen = new Dialog(Dialog.D_OK, "Look out!!!",
            Dialog.OK,           Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),         Manager.VERTICAL_SCROLL);
        ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
    }
    

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

Maybe you are looking for