Reputation: 11
"UPDATE realizaIm SET fechaHoraEntrega='"+fechaHoraEntrega+"', fechaEntrega='"+fechaEntrega+"' WHERE cvePaciente='"+cvePaciente+"' AND WHERE cveAnalisis='"+cveAnalisis+"';";
I'm getting an error here, it says it's near WHERE cveAnalisis='"+cveAnalisis+"';";
I just can't find it, please help
Upvotes: 0
Views: 33
Reputation: 1456
You need to use "WHERE" clause only once.
"UPDATE realizaIm SET fechaHoraEntrega='"+fechaHoraEntrega+"', fechaEntrega='"+fechaEntrega+"' WHERE cvePaciente='"+cvePaciente+"' AND cveAnalisis='"+cveAnalisis+"';";
The right syntax to use WHERE clause is `
"...WHERE condition1 AND condition2 OR conditions3..."
Upvotes: 0
Reputation: 16544
Remove the extra WHERE
from:
WHERE cvePaciente='"+cvePaciente+"' AND WHERE cveAnalisis='"+cveAnalisis+"'
so it should be like this:
WHERE cvePaciente='"+cvePaciente+"' AND cveAnalisis='"+cveAnalisis+"'
Upvotes: 1