Pregunta

Any thoughts on why WHERE clause would not work? I have made sure I have double checked the coding and spelling etc. It will not work with a simple WHERE clause, and I have tried using different operators, operators that I know are in the table. I have tried using trailing spaces, I have copied and pasted the output from SELECT DISTINCT column_name FROM table. In short I have really made sure that it is not just some dumb error on my part before posting this question.

Here are the specs of the column that is giving me trouble. UTF8_General_Ci and it VARCHAR(100).

I have never had any problems with a WHERE clause, not like this at least. Any thought? Thanks in advance

Here is the code;

SELECT site_specialty FROM site WHERE site_specialty='INTERNAL MEDICINE'

there is no error message, it just comes up blank 0 rows returned

¿Fue útil?

Solución

try this

 SELECT site_specialty FROM site WHERE site_specialty LIKE '%INTERNAL MEDICINE%'

Otros consejos

Before giving up entirely, I would try:

SELECT site_specialty
FROM site
WHERE upper(site_specialty) like '%INTERNAL%MEDICINE%';
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top