Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE handelsposten_bestand SET Bestand = (SELECT items.Quantity FROM items WHERE items.ContainerID=4161 and items.ObjectTypeID=handelsposten_bestand.ID);
- UPDATE handelsposten_bestand SET QualitaetVK = (SELECT items.Quality FROM items WHERE items.ContainerID=4161 and items.ObjectTypeID=handelsposten_bestand.ID);
- UPDATE handelsposten_bestand set PreisVK = CASE WHEN Bestand >= '900' THEN BasePrice*0.25 WHEN Bestand >= '500' THEN BasePrice*0.5 WHEN Bestand >= '250' THEN BasePrice*0.75 ELSE BasePrice END;
- UPDATE handelsposten_bestand set PreisAK = CASE WHEN Bestand >= '1000' THEN 0 WHEN Bestand >= '900' THEN BasePrice*0.15 WHEN Bestand >= '500' THEN BasePrice*0.3 WHEN Bestand >= '250' THEN BasePrice*0.60 ELSE BasePrice*0.75 END;
- UPDATE handelsposten_bestand set MinAKQuali = CASE WHEN Bestand < '100' THEN AddQuali WHEN Bestand >= '100' THEN QualitaetVK-5 ELSE 60 END;
- UPDATE handelsposten_bestand set AnkaufMax = Begrenzung-Bestand;
- DELETE FROM handelsposten_ankauf;
- INSERT INTO handelsposten_ankauf (ID, MengeAnkauf, IstAKQuali) SELECT ObjectTypeID, Quantity, Quality FROM items WHERE ContainerID='4185';
- UPDATE handelsposten_ankauf SET Name = (SELECT handelsposten_bestand.Name FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_ankauf.ID);
- UPDATE handelsposten_ankauf SET PreisAK = (SELECT handelsposten_bestand.PreisAK FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_ankauf.ID);
- UPDATE handelsposten_ankauf SET MinAKQuali = (SELECT handelsposten_bestand.MinAKQuali FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_ankauf.ID);
- UPDATE handelsposten_ankauf SET AnkaufMax = (SELECT handelsposten_bestand.AnkaufMax FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_ankauf.ID);
- UPDATE handelsposten_ankauf SET PreisGesamt = PreisAK*MengeAnkauf;
- DELETE FROM handelsposten_verkauf;
- INSERT INTO handelsposten_verkauf (ID, MengeVK, QualiVK) SELECT ObjectTypeID, Quantity, Quality FROM items WHERE ContainerID='4496';
- UPDATE handelsposten_verkauf SET Name = (SELECT handelsposten_bestand.Name FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_verkauf.ID);
- UPDATE handelsposten_verkauf SET PreisVK = (SELECT handelsposten_bestand.PreisVK FROM handelsposten_bestand WHERE handelsposten_bestand.ID=handelsposten_verkauf.ID);
- UPDATE handelsposten_verkauf SET PreisGesamt = PreisVK*MengeVK;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement