Can we rename the system generated constraint_name as per our convenience ?

I created a table by
CREATE TABLE table_name AS (SELECT * FROM existing_table_name WHERE 1=2);
and got the all constraints of the existing table with default names. I want to rename those constraints as per current table data.
thank you in advance
Edited by: 930934 on Apr 29, 2012 8:51 AM

sb92075 wrote:
WHY? What difference does the CONSTRAINT_NAME make?A lot. Because with a consistent naming convention it's a lot easier to understand the error message when the constraint is violated.
When you see this error message:
SQL> insert into foo (id, some_value) values (1, -1);
insert into foo (id, some_value) values (1, -1)
ERROR at line 1:
ORA-02290: check constraint (FOOBAR.SYS_C0016210) violatedDo you really know which column violates the constraint?
Now give the constraint a meaningful name, like this:
SQL> insert into foo (id, some_value) values (1,-1);
insert into foo (id, some_value) values (1,-1)
ERROR at line 1:
ORA-02290: check constraint (FOOBAR.CHK_SOME_VALUE_POSITIVE) violatedthen it becomes obvious which of the colums is meant.
Or think about foreign keys:
SQL> insert into bar (id, foo_id, product_id) values (1, 0, 0);
insert into bar (id, foo_id, product_id) values (1, 0, 0)
ERROR at line 1:
ORA-02291: integrity constraint (FOOBAR.SYS_C0016214) violated - parent key not foundAgain, with the right name, it becomes obvious which column violated the constraint:
SQL> insert into bar (id, foo_id, product_id) values (1, 0, 0);
insert into bar (id, foo_id, product_id) values (1, 0, 0)
ERROR at line 1:
ORA-02291: integrity constraint (FOOBAR.FK_BAR_REFERENCES_FOO) violated - parent key not foundMost probably one would use a slighlty less verbose name for the foreign key in real life due to Oracles limit on identifiers, but it shows how much more readable an error message is, with a proper name.

Similar Messages

  • Can we rename the existing z-program in SAP-abap

    Can we rename the existing z-program in SAP-abap. If yes, than how it can be done. But actually we don't want to copy the code from the existing z-program to the new one which will be created. We just want to make rename the existing z-program in SAP-abap. Please suggest, how it can be?
    Edited by: akg.amit on Oct 20, 2010 7:40 AM

    Hi Amit,
    In SE38 Open the program with old name. Press the RENAME button. In the Target program field provide the new name of program name. This new name for program should not exist in your system. Click on the Rename button. It will give a pop-up where it ask if you want to rename any includes in that program. I assume you dont have any includes in the program. So press the Rename button again without selecting the "Include" check box. Now it will ask for the Transport request. Provide your Transport request number. The program will be renamed.
    Regards,
    Immanuel.

  • How to know the system generated password when reseting users password?

    Dear All,
    I have reset password using "genarated new password" in the portal from User admin,but dont want to send a e-mail notification  to end users, instead of that i want to know the system generated password.
    But system doses't shows it.How can I tell what the password is and give it to the user?
    I have a All super admin rols.
    Pleas guide.
    Thanks in advance.

    Basically you can't! If you tell it to generate one, then that's only sent to the user. Why not enter your own random password or let the user pick their own through some sort of self service function?

  • Adding Pre-fix in the  system generate PR No. Range

    hello,
    is there anyway i can configure that the PR no range has a pre-fix ie: 'AB'-1000001 ?
    i have configure the system generated pr no.series and my client requires a prefix to be add in the series..
    pls help. thanks
    she

    Hi Ravi,
    Thanks.. unfortunately there is no abap at my client and am trying to program myself..
    i tried this but its not being populated with prefix.. consider me newbie in abap
    96: 5500000-5599999
    PR No. should be : PR-5500001
    IF neban-ekorg EQ 'CHIN'.
      CASE NEBAN-BSART.
      WHEN 'ZN13'
      RANGE = 'PR' + '96'.
          WHEN OTHERS.
        ENDCASE.
    ENDIF.

  • Is there any way to customise the system generated packing slip?

    Hi All,
    My customer would like to be able to add a few field to the system generated packing slip. I can see where to update things on the invoice in system emails, but couldn't see anywhere for the packing slip?
    Also there's a few random bits that get printed on the invoice that aren't part of the system invoice. Any idea how to remove? My client is printing from Chrome. See below:

    Thanks for replying @thetrickster888,
    Tried all 4 tags but none showed the phone or email on the packing slip
    {tag_addressbilling}
    {tag_addressshipping}
    {tag_recipientaddress}
    {tag_emailaddress}
    We use a pretty standard Registration-buy form and have the phone line as:
    <td><label for="HomePhone">Phone Number </label><br />
                    <input type="text" maxlength="255" class="cat_textbox" id="HomePhone" name="HomePhone" /></td>
    But still doesn't show on the packing slip. I don't know what else to do.
    I can get them all to show on the invoice but not the packing slip. The only thing I can think of is to give the factory the invoice - but then it's not set up well enough for them to mark off the checks when it's made and packed (we have special boxes on the packing slip for this) plus then they can see pricing which we try to avoid.

  • I cannot open Adobe photoshop CS2 which I was using 10 days ago.  Can I restore the system to before 10 days, so it will work again?

    I cannot open Adobe photoshop CS2 which I was using 10 days ago.  Can I restore the system to before 10 days, so it will work again?

    The hatter wrote:
    Rosetta can have a 2GB RAM "tax" to manage PowerPC code as well as how that affects performance.
    I think real world performance shows both statements to be wrong; consider this:
    If that were the case, how come Apple does not include that information in its Snow Leopard installation requirements, since Rosetta is an optional install?
    Also, running a PowerPC app on an 2011 i7 Mac with Snow Leopard will run faster than running that PowerPC app on a PowerPC Mac.

  • The table name for the system generated transactions (Retained Earnings).

    Hi Gurus,
    I have a doubt and want to know from U experts there. Hope you won't let me down. The situation is
    I have created a new chart of account in our Oracle Financial. Uploaded 2007 transactions and opened year 2008 and closed all the periods of year 2007.
    When I open a new year Oracle will do internal process transfer R&L balance to Retained Earnings account and make income & expenses accounts to Zero.
    I want to know the system generated entries which table they are stored, this transaction is not in Gl_Balances table.
    Its an urgent plz reply back soon.
    Thanks in advance
    Barkat

    Hello.
    For EBS 11.5.10.2
    Let’s suppose that the last period of you fiscal year is called ‘LAST-2008’ (not adjusting period). If you have an account with a debtor balance of 100 in this period, when you open the following fiscal year you will find an entry of 100 in the first adjustment period of the fiscal year that the ‘LAST-2008’ period belongs to, in the column BEGIN_BALANCE_DR.
    It is clear that if the balance is creditor you will find it in the BEGIN_BALANCE_CR column.
    Hope this helps.
    Octavio

  • How can I put the report generated by a program into a File?

    Hi all,
       How can I put the report generated by a program into a File?It can be in TXT format or excel format which ever is possible.
    I need to export this file to memory,How can I do that??
    Regards,
    Shashank.

    Hello Shashank,
    Please ignore my previous answer... Ofcourse it works...
    There are several ways to do this...
    two of them are
    1. List -> Save -> File and press enter..
        it will ask for the format, then path where to save it. Just give the path.
    2. Using function module 'GUI_DOWNLOAD'.
    I'm giving the example bellow which explains the usage of both GUI_UPLOAD and GUI_DOWNLOAD.
    To do this... you need to have folder with name 'TEST' and a .txt file in it with name 'test'. And contents of it are :
    TEST1             ,BOT 
    TEST2             ,BOT 
    TEST3             ,BUT 
    with spaces.
    REPORT zssr_bdc .
    DATA: BEGIN OF g_t_itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
          END OF g_t_itab.
    DATA: g_t_bdcdata TYPE TABLE OF bdcdata.
    DATA: path TYPE string,
          path1 type string.
    path = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test.txt'.
    path1 = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test1.txt'.
    *contents of test.txt    *
    *TEST1             ,BOT  *
    *TEST2             ,BOT  *
    *TEST3             ,BUT  *
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = path
      TABLES
        data_tab                      = g_t_itab.
    LOOP AT g_t_itab.
      WRITE:/1(18) g_t_itab-matnr, 20(40) g_t_itab-maktx.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       filename = path1
       filetype                      = 'ASC'
      TABLES
        data_tab                      = g_t_itab.
    Now you will get one .txt file with name 'TEST1.TXT' in the TEST folder.
    <b>REWARD POINTS IF IT IS HELPFUL</b>
    Regards
    Sasidhar Reddy Matli

  • Can we rename the database name in oracle 10g

    Hi,
    Can we rename the database name in oracle 10g.
    Please help

    Yes as already said, using DBNEWID Utility can renamed the database name.
    You can also take a look at the Oracle Metalink Note:429674.1 (Which was written by me) - Subject: How We Used the Oracle DBNEWID Utility to Change the Database Name
    Regards,
    Sabdar Syed.

  • I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I think you're asking 2 different questions.
    The PID control toolset is for using PID loops for control; it's just software.
    The DAQ card and scxi chassis are hardware. If you have the appropriate signal conditioning cards in your chassis to control/monitor your solenoid valve, then you can run a PID loop.
    I believe the simple answer is: the PID control toolset is the best way to do control, but there are simple PID VI's (even on this website) that you can download and use for simple control.
    Mark

  • How can I get the system date in mm/dd/yyyy,

    how can I get the system date in mm/dd/yyyy, i need to compare system date with some other date,continuosly using threads,can U plz help me.
    With Some code
    Thanks In advnace
    Mahiiii

    Hi,
    You can use SimpleDateFormat class under java.text package.
    SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yy h:mm a z", new Locale());
    //formatter.setTimeZone(timezone);
    String dateTime = formatter.format(new Date());

  • Everytime my AppleTV2 enters into sleep modus it requests again the WIFI network password. This is new, where can I set the system to remember the password?

    Everytime my Apple TV 2 enters into sleeping mode it requires my WIFI network password again upon reconnection. This is new, how can I set the system to remember the password?

    Open Mail preferences, click on the Accounts icon in the toolbar then select your mail account, click on the Mailbox Behaviours tab on the right. Set the dropdown menu at the bottom for the Never option.
    However, you cannot change the default options set for a newly created account.

  • HT5621 I have changed my AppleID but I can't get the "system preferrences" to show my new AppleID.  What am I doing wrong?

    I have changed my AppleID but I can't get the "system preferrences" to show my new AppleID.  What am I doing wrong?  I am running 10.9.2.  I support multiple devices on this icloud account and they all work fine.  Its just the mac mini ...

    I found a post with the answer.  Basically I just logged out of the iCloud.  My concern was that I would loose my contacts.   But when i logged back in with the correct AppleID -- it was all there.
    Thanks!

  • I have purchased a macbook air with 64 gb hard disk. the available space is only 10gb. With this available space, i can't use the system effectively. kindly advise.

    I have purchased a macbook air with 64 gb hard disk. the available space is only 10gb. With this available space, i can't use the system effectively. kindly advise.

    You should have bought one with a larger SSD. You can regain some space by disabling the sleepimage file:
    To disable safe sleep, run the two following commands in Terminal:
    $ sudo pmset -a hibernatemode 0
    $ sudo nvram "use-nvramrc?"=false
    When done, restart your computer. Now go delete the file "/private/var/vm/sleepimage" to free up some hard drive space. When you put your computer to sleep it, should happen in under five seconds; my MacBook now goes to sleep in two seconds.
    [robg adds: To state the obvious, with safe sleep disabled, a total power loss will wipe out whatever was open on your machine. To enable safe sleep mode again, repeat the above commands, but change hibernatemode 0 on the first line to hibernatemode 3, and =false to =true on the second line. You'll then need to reboot again. Personally, I prefer the safe sleep mode, even with the slower sleep time and hard drive consumption -- even if for no other reason than it's great when changing batteries on a flight.]
    You can also delete unneeded files:
    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion's Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • HT1222 I can't upload the system update in my IPad 2.....

    I can't upload the system updates in my iPad 2. An error massage appears.

    And the error message is ... ?

Maybe you are looking for

  • My browser takes minutes to open then when the tab is fully loaded it will start saying "Connecting" and slow down or freeze.

    When I open my browser, it takes 3-5 minutes to fully open. When I get to a website, randomly the tab will say 'Connecting' and slow down and take 10-15 minutes to function or freeze completely. This almost always happens on sites that require Flash

  • F110 - execute/clearing in future date

    Hi friends, How can I schedule that F110 just run in a future date, I mean, which is the field that I need to set up to determine that F110 will just run in one week, for exemple?! Thanks

  • Help in bex

    hii guys...i have got a report which lokks like this Sanction_amount    Purchase_order_value     Under_Utilized   7000                            500                           6500   7000                            400                           6600

  • Calendar (iPhone & iPod)

    Hello all I have a 3g iPhone & a 2nd Gen iPod I don't have a big problem In our Calandars we can set it up to have different groups within the calandar Eg: •All •Calandar •Medical •Work •Ect... all with a different colour • "dots" next to each group.

  • Cant get Claro search Malware of my Firefox!!!!!!!!!

    Claro Search has installed itself on my Firefox. I have been able to successfully remove it from my Internet Explorer and Google Crome, but not from Firefox. I have already treid the following: 1. Disable Add-ons And Extensions 2. Reset the browser.s