Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Script to Disable Constraint, Change Value, then Enable Constrain

RE: Script to Disable Constraint, Change Value, then Enable Constrain

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Wed, 28 Nov 2001 02:58:42 -0800
Message-ID: <F001.003CE9A6.20011128022025@fatcity.com>

How
could this be user proof? You are essentially disabling the constraint that WILL enforce data integrity, then letting the user input whatever rubbish he wants to, and are then going to try and enable the constraint afterwards?
<FONT face=Arial color=#0000ff
size=2> 
Not a
good approach.. How can you ensure that the user hasn't put a duplicate value in (unique constraint) or something else that might break the constraint rule? The only way you are going to know is when you try and re-enable the constraint it will fail..
<FONT face=Arial color=#0000ff
size=2> 
I
struggl<FONT face=Arial
color=#0000ff size=2>e to see why you would want to do this - do you have any more info?

<FONT face=Tahoma

  size=2>-----Original Message-----From: root_at_fatcity.com   [mailto:root_at_fatcity.com]On Behalf Of David WagonerSent: 27   November 2001 21:30To: Multiple recipients of list   ORACLE-LSubject: Script to Disable Constraint, Change Value, then   Enable Constrain   

<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Listers,
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Does   anyone have a script that will do the   following:
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">    

    <LI class=MsoNormal

    style="COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN 
    class=EmailStyle15><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Accept 
    user input for old data value
    <LI class=MsoNormal
    style="COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN 
    class=EmailStyle15><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Accept 
    user input for new data value
    <LI class=MsoNormal
    style="COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN 
    class=EmailStyle15><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Disable 
    table constraint
    <LI class=MsoNormal
    style="COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN 
    class=EmailStyle15><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Update 
    record with new data value
    <LI class=MsoNormal
    style="COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN 
    class=EmailStyle15><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Enable 
    constraint
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">A   script like this would help ensure that constraints are not left “off” after   updates, allowing “illegal” data into the tables.<SPAN   style="mso-spacerun: yes">  Good user-proof script I would   think.
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">TIA,
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">david
<FONT face=Arial color=black

  size=2><SPAN
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> 
<span

style="mso-spacerun: yes"> AUTOTEXTLIST \s "E-mail Signature" <FONT
  face=Arial color=blue size=2><SPAN
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">David   B. Wagoner
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: italic; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Database   Administrator<SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: italic; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Arsenal   Digital Solutions Worldwide Inc.<FONT face=Arial   color=black size=2><SPAN
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">4815   Emperor Blvd., Suite 110<FONT face=Arial color=black   size=2><SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Durham,   NC 27703<SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Tel.   (919) 941-4645<SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Fax   (919) 474-0735<SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Email
<FONT

  face="Times New Roman"><SPAN
  style="FONT-FAMILY: 'Times New Roman'">mailto:dwagoner_at_arsenaldigital.com<FONT   face=Arial color=black size=2><SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">Web
<SPAN

  style="FONT-FAMILY: 'Times New Roman'">http://www.arsenaldigital.com/<FONT   face=Arial color=black size=2><SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"> <FONT   face=Arial color=black size=2><SPAN
  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<SPAN

  style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><SPAN
  style="mso-spacerun: yes">                                                                                                          

<SPAN
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">***<SPAN 
  style="mso-spacerun: yes">  NOTICE<SPAN 
  style="mso-spacerun: yes">  ***<FONT face=Arial 
  color=black size=1><SPAN 
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">

<SPAN

  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">This   e-mail message is confidential, intended only for the named recipient(s) above   and may contain information that is privileged, work product or exempt from   disclosure under applicable law. 
  If you have received this message in error, or are not the named   recipient(s), please immediately notify the sender at (919) 941-4645 and   delete this e-mail message from your computer.<SPAN   style="mso-spacerun: yes">  Thank you.<FONT   face=Arial color=black size=1><SPAN
  style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt; mso-color-alt: windowtext">
<FONT
  color=black><SPAN 
  style="COLOR: black"> <FONT 
  color=black><SPAN 
  style="COLOR: black; mso-color-alt: windowtext">
Received on Wed Nov 28 2001 - 04:58:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US