DBA Assistance - Anyone?

Discussion in 'Software' started by Mada_Milty, Nov 24, 2005.

  1. Mada_Milty

    Mada_Milty MajorGeek

    Howdy, y'all

    This may be a question better posed in programming forum, so mods, please feel free to move it.

    I am on a Oracle v 8 database. One of our users came to me with the request that certain values be zeroed out from a table.

    I've selected the values with this query:

    Code:
    select MINIMUM_ORDER_QTY from PART where ID BETWEEN '419-46-11211' AND '419-T80-A960';
    This brings up the correct values. Now, when I try to delete these values with:

    Code:
    delete from part;
    I get an integrity constraint violation. Woo! Okay, so I try to alter the constraints on the table with this query:

    Code:
    alter table part disable constraint (constraint_name);
    and I get an ORA-00933 error : SQL command not ended properly error. This is what's getting me. Hoped someone might have some suggestions.
     
  2. Mada_Milty

    Mada_Milty MajorGeek

    Nobody? I can tell you're looking!
    Heh, before anybody asks, I am logged into the database with the administrative account, and I have tried all possible variations of the constraint name.

    It was in the format username.constraintname

    I've tried that and got command not ended properly.
    I've tried just username, and got ORA-02250: missing or invalid constraint name
    I've tried just constraintname, and got ORA-02250: missing or invalid constraint name
    I've tried constraintname.username and got ORA-02250: missing or invalid constraint name


    AARRRRRRRRRRRRRRRRGGGhhh

    I feel bad for the user. Without these values zeroed out, he has to go through ALL the reports from this and scratch out the values.
     
  3. jewlzs

    jewlzs Corporal

    The data you want to delete has joins to previous work. Try a filter instead this will allow the user to run exactly what he / she needs.
    The data will not delete if it is joined or calculated with other tables, queries, reports.

    I assume your user only needs specific data criteria - use a filter within the querie bounderies.

    If the data to be deleted is obsolete to all users update with the administration and work from the table or better still write code to dump it into a new table
     
  4. spaz

    spaz Specialist

    Ok.. can you please describe the record set you are returning and, also, which fields/records you are trying to delete?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds