Problems while trying to make a query with variables in the conditions (stored procedure)
- by pablo89
Hi!! Im having a problem, Im trying to do a query... I remember that in the past I did something like this but today this query is returning nothing, no error, no data, just nothing... the query is something like this:
SELECT field1, @variableX:=field2
FROM table
WHERE
(SELECT COUNT(fieldA) FROM table2 WHERE fieldB=@variableX AND fieldC=0)0…