Welcome to AC Web.
Results 1 to 5 of 5
  1. #1

    Question SQL Question... How to Mass Change Entry ID's to Different Entry ID's??


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Hello All,

    I guess the title sort of tells it all, but I will explain what I really am looking to do.

    I am looking to mass change entry id's in item_template say the id's are 100000-101000

    I would like to change those id's in a query to be say 200000-201000.

    I would really like to not have to change those suckers manually like I have been if there is a way to do it in an UPDATE query that would be great.

    I have searched not only this forum I have even looked at sql documents but maybe I am not just a noob at sql I'm a noob at googling as well. I just don't see the solution unfortunately.

    So if anyone has a solution to my problem I would appreciate it very much

  2. #2
    Web/SQL Dev & 3D Artist

    Join Date
    Oct 2010
    Location
    somewhere between <?php and ?>
    Posts
    3,208
    Code:
    BEGIN;
    UPDATE item_template SET entry = entry + 200000 WHERE entry BETWEEN 100000 AND 101000;
    Try this and see if it works. If there is any problem run this
    Code:
    ROLLBACK;
    Otherwise if it works correctly run this
    Code:
    COMMIT;
    or just make a backup to be 100% safe

  3. #3
    Thank you Tok124. That worked like a charm with a little slight tweak to it. How I was reading that.

    entry + 200000 would make my entries 300000+ So i assumed that and made it + 100000 and it worked like a charm.

    Again thank you so much and +rep if I can.

  4. #4
    Web/SQL Dev & 3D Artist

    Join Date
    Oct 2010
    Location
    somewhere between <?php and ?>
    Posts
    3,208
    Aaaah yeah sorry my bad haha. im happy you solved the problem

  5. #5

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Yeah I am very appreciative of your help on this problem I was having and the manual route was going to take me forever.

    With your help mass entry editing is no problem for me now

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •