MySQL Forums
Forum List  »  Newbie

Help with query
Posted by: PAUL CARLOS HERRERA PEREZ
Date: November 01, 2018 03:11AM

Good evening, zorry for my bad english. I hope all of you can help me. I've been looking for a solution for a long time and I have not reached anything.
I have two tables with the following data:


I make a query only for the movements table and it returns the expected results:



Now I want to include the name of the client, but this is where the result varies:



It returns the records to me in a disorderly way, or at least I thought so, since I could see that the records were sorted according to the PK of the client table "clientId". But it must be ordered by "MotionId", probe with "ORDER BY movementId" and I order it but the results of the deposit, withdrawal and available column go wrong. Maybe you can improve the query or have something to do with the motor use: ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci. Thank you very much for your help

Options: ReplyQuote


Subject
Written By
Posted
Help with query
November 01, 2018 03:11AM
November 03, 2018 03:38AM
November 02, 2018 11:02AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.