Error 1064 Mysql Workbench

Asked

Viewed 94 times

-2

I am a student of Analysis and Systems Development, and I am having trouble with the creation of the script below:

erro select

the error shown is as follows::

Error Code: 1064. You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near '' at line 7

erro no select and also appears the following message when position the cost over select.

print of the suggested change here in the forum. alter

But the error persists.

  • Missed the BEGIN / END.

  • I inserted the BEGIN one line above the SELECT and the END after the last line, but the error persists with the select underlined in red.

1 answer

0


It seems that the parentheses are unbalanced in the filter conditions. Try

select avg(fn_media(NotaP1, NotaP2))
as "Media Exame"
from notas
wherer DisciplinaId = Var_DisciplinaId
and (fn_media(NotaP1, NotaP2)) >= 4.0
and (fn_media(NotaP1, NotaP2)) <= 6.9
  • excellent, these things blind us, rsrsrsrsr, problem solved, were only the parentheses.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.