Question

I'm in the process of migrating a locally hosted MySQL database over to a cloud based MySQL database using Xeround. I'm running a test script that uses a left join to form a table and then runs two select statements

--one where the VAL and KVAL fields are equal and one that returns the complement of this set (where the VAL and KVAL sets are not equal).

I'm having no problems getting the records where VAL and KVAL match using (VAL=KVAL) as a where statement. I'm able to get the records where VAL=KVAL in both setups. I'm able to get the complement in my local setup using the where statement: VAL!=KVAL OR (KVAL IS NULL).

However, when I run this same Select/Where statement in my Xeround setup it returns a NULL set. The Xeround database uses PHP MyAdmin if that is helpful. I've also played around with <>, placing an exclamation mark or not statement outside of the original where statement. This should be fairly straight forward. Can you help me out?

Was it helpful?

Solution

The complement condition of

WHERE ( val = kval )

is:

WHERE ( val <> kval  OR  val IS NULL  OR  kval IS NULL )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top