-1

This is what i'm trying to query for example:

Code Example:

SELECT IF(MAIN.PROCESS = 0,"YES","NO") AS `SUCCESS_LOG`, FROM `XLSX_UPLOAD` AS MAIN WHERE `SUCCESS_LOG` LIKE 'NO' 

Unfortunately, I cannot find what I'm doing wrong other than it's something related to the WHERE condition search.

1

1 Answer 1

1

Since SUCCESS_LOG is not a real field, you need to use HAVING to check on it.

HAVING `SUCCESS_LOG` LIKE 'NO' 

Though, in this query, I would just check your MAIN.PROCESS (again). That would probably be more efficient.

WHERE `MAIN`.`PROCESS` = 0 
Sign up to request clarification or add additional context in comments.

1 Comment

OMG - "HAVING" is the syntax! many thanks

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.