Jop008: forget d, it’s an.

 
Suoboda: I don’t grasp : FROM a LEFT JOIN b INNER JOIN c ON . AS d ON .

Decoux: Jop008: FROM a LEFT JOIN b INNER JOIN c ON b.id = c.id AS d ON a.id2 = d.id2

Spradlin: Not intuitive but I am trying

Decoux: Jop008: b is related to c. d is a derived table. a is joined on d.

Clyatt: Decoux: Is d a derived table?

Decoux: Salle: technically, yes.

Clyatt: Decoux: What version of MySQL supports such alias?

Decoux: Salle: umm, right. I’ve been clearly working too much with other rdbms

Decoux: Remove the as d and fix the ON clause, and it’ll work with MySQL

Decoux: Salle: I mix constructs more and more.

Clyatt: Decoux: One of the reasons I focused on MySQL dialect only long ago

Bradtke: A = rest of the query, b = m_string, c = m_language, d = m_string_usedat,?

Decoux: Jop008: no, those are all tables!

Decoux: Jop008: FROM a LEFT JOIN b JOIN c ON . ON a.col = b.col AND .

Triffo: Hi everyone, does this query seem right? I am trying to change the time zone to +06:00 but it does not work. QUERY: “update backup.addresses set created_at = ‘2009-09-02 19:23:45 +0600’ where castid as char like ‘99916’” . It works fine if i change the hour or date or whatever except the time zone.

Decoux: Jop008: everything is a table in the FROM clause.

Decoux: Jop008: perhaps you should review some sql tutorial on joins?

Clyatt: Jop008: You SELECT . FROM tables

Clyatt: Naftilos76: Try it as SELECT first

Jeffryes: See here my query http://pastebin.com/AKbZU4PL

Clyatt: Naftilos76: Fix that stupid WHERE clause

Clyatt: Naftilos76: 1 You don’t need CASTid AS CHAR and 2 You don’t need LIKE with numbers

Teichmann: So m_language must be used only when there are records on tooltip

Ferry: Salle: fix what? is it the casting?

Clyatt: Naftilos76: WHERE id = 99916 for god sake

Clyatt: Jop008: You just described inner join

Augustine: Salle: the casting is there because the query deals with all kinds of columns not only numbers

Kummerow: You need a strong fishing pole if you use CAST too much tho

Fiorica: Of course my description is wrong otherwise it was laready solved

Veeneman: Salle: what do you propose when dealing with various data types?

Kummerow: Fix your normalization?

Leidel: So I have a big query and somewhere I want to add strings to it strings are linked to target tables a string on tooltip can be there but can also omitted

Clyatt: Naftilos76: it is idiotic to convert integer to string in order to compare it to another number

Clyatt: Naftilos76: it is idiotic to use LIKE for exact matches when there is = operator

Brunmeier: I am nt sure what you mean. Casting data types to char helped me deal many issues with non-latin characters. I think i am going to stay with casting

Miyao: What is wrong with this query? http://sqlfiddle.com/#!9/c0f95f/3

Clyatt: Naftilos76: Casting integers to char helped you deal with issues with non-latin characters?

Renker: JosephSilber: Don’t ask us “What’s wrong with this query.”. We are not SQL p****rs. We do not care to look character by character looking for errors when MySQL will tell all of us WHERE the error is. Paste the FULL error issued by MySQL.

Marcom: Salle, I thought since I pasted a SQLFiddle, that doesn’t apply.

Knispel: It gives you the full error there:

Clyatt: JosephSilber: See? MySQL tells you where exactly the error is

Pilon: So I ask again: what is the error?

Decoux: JosephSilber: WHERE SELECT . is invalid SQL.

Kanakares: I can’t figure out what a,b,c,d are

Decoux: Jop008: forget d, it’s an alias that only works on another rdbms