Jump to content
×
×
  • Create New...
  • 0

Searching this query...


Jimmermania

Question

hello guys, can anyone tell me how can i do this query ? for every vnum of table item_proto which exists on table item_proto_translated replace the locale_name from the translated proto to item_proto.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
1 hour ago, iMerv3 said:
  Hide contents

update item_proto set locale_name=(select locale_name from item_proto_translated where vnum=item_proto.vnum);

 

Thanks man... when i run it , it says: Column 'locale_name' cannot be null

Link to comment
Share on other sites

  • 0
12 minutes ago, iMerv3 said:

The error is clearly understable. But whatever run this

  Hide contents

update item_proto_translated set locale_name="noname" where locale_name='';

 

I removed NOT NULL from item_proto and your first query worked.

This error , i think it was because some vnums from item_proto , does not exist on item_proto translated.

 

How can i fix it with query to go to next vnum that exists? i mean, to search ONLY the vnums which exist on both table. If the vnum does not exist on one or other table, move to other vnum

Link to comment
Share on other sites

  • 0
  • Moon

ah okay

Spoiler

update item_proto set locale_name=coalesce((select locale_name from item_proto_translated where vnum=item_proto .vnum), 'noname');


 

Edited by iMerv3
  • Love 1
Link to comment
Share on other sites

  • 0
12 minutes ago, iMerv3 said:

ah okay

  Hide contents

update item_proto set locale_name=coalesce((select locale_name from item_proto_translated where vnum=item_proto .vnum), 'noname');


 

this put "noname" at the vnums which not exist. how can i leave them like they are ? i mean not translated and without noname? sorry...

Link to comment
Share on other sites

  • 0
16 minutes ago, iMerv3 said:

😀

  Hide contents

update item_proto set locale_name=coalesce((select locale_name from item_proto_translated where vnum=item_proto .vnum), item_proto.locale_name);

 

Thats it... thanks a lot for your time man. Appreciate it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 0

      Looking for Someone to create the queries etc for armors and weapons

    2. 13

      Official Private Shop Search

    3. 944

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    4. 79

      GUI Teleport System

    5. 0

      inventory slot marking system cant compile

    6. 8

      Inventory Bug

    7. 63

      Metin2 Dev - Changelogs

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.