MY Sql Query Error - Not able to Understand the issue
I am new at MYSQL,I wrote simple query as follow:
CREATE Table tblFeedBack ( FeedBackID INT AUTOIncremeNT, UserID INT, InsertedTS TIMESTAMP , FeedBackValue VARCHAR(100), PRIMARY KEY (FeedBackID) );
CREATE PROCEDURE tblFeedBackInsertUpdate ( IN UID INT, IN FB_Value VARCHAR(50) ) BEGIN
IF ((Select COUNT(*) From 'tblFeedback') < 3) BEGIN INSERT INTO 'tblFeedBack' (UserID,FeedBackValue) VALUES (UID,FBValue); END ELSE BEGIN DECLARE @MostRecentFID INT;
Select TOP 1 FeedBackID FROM tblFeedback WHERE UID = UID ORDER BY InsertedTS DESC INTO @MostRecentFID;
UPDATE tblfeedback SET FeedBackValue = @FeedBackValue Where FeedBackID = @MostRecentFID END END
I am getting an error as follow:
Schema Creation Failed: 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 ''tblFeedBack' (UserID,FeedBackValue) VALUES (1,'12')' at line 9:
Can anyone please help me to solve this one ? Thanks in advance.
View Answers
Ads
Related Tutorials/Questions & Answers:
MY Sql Query Error - Not able to Understand the issue
MY Sql Query Error - Not
able to
Understand the issue I am new at MYSQL,I wrote simple
query as follow:
CREATE Table tblFeedBack ( FeedBackID INT... END
I am getting an
error as follow:
Schema Creation Failed: You have an
error
SQL QUERY ERROR
SQL QUERY ERROR Im writing a
query which shows
error of INVALID CHARACTER
The
Query is
Insert into
PMST_EMP_MST(PMSNUM_EMP_ID,PMSSTR_EMP... THE FORM IS THROWING THE
ERROR OF INVALID CHARACTER BUT THE SAME
QUERY IS RUNNING
Advertisements
Please help me understand this query
Please help me
understand this query Hi,
Could someone please help me
understand the following
query. Im finding difficulty relating it :-( Pls Help!
select * from cbpartner where CBPartner.IsSummary='N' and salesrep_id
Sql Query
Sql Query Is this
query work in Db2 or not ?
Select * from FORUM LIMIT 2
Sql Query
Sql Query Is this
query work in Db2 or not ?
Select * from FORUM LIMIT 2
Resultset Issue in SQL
Resultset
Issue in SQL when i call rs.next() in
my code it is returning false, though im having valid
query to execute and fetch a row from database.how can i resolve this
issue.
My code is:
SELECT JOBDESCRIPTION,CATEGORY
sql query
sql query two tables are emp,loc
write a
query to display all the emp information whose locname not equal to bangalore
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
Sql Query
Sql Query Hi M Navjeet Ghai
I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using
sql query
sql query
sql query hi friend,
Im doing a project,in that a main id... numbers of sids.i want to delete the sid based on the mid.for that i need
sql query plz help to me
SQL Query
SQL Query Selecting the third highest salary of Employee without using any subquery?
Here is a
query:
SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
SQL QUERY
SQL QUERY am a having a table 'PROGRAMMER' with columns... C pascal
Bhanu
Sql... Pascal
Sql
Mahesh DBASE Cobol
My SQL
My SQL Connection class for MySQL in java
error : not an sql expression statement
error : not an
sql expression statement hii I am gettin followin
error in connecting to database SQLserver 2005 in Jdeveloper,i m usin struts and jsp
my pogram:
import java.sql.*;
public class TaskBO
{
public TaskBO
ModuleNotFoundError: No module named 'sql-query'
ModuleNotFoundError: No module named '
sql-
query' Hi,
My Python... python library, ModuleNotFoundError: No
module named '
sql-
query'
error... '
sql-
query'
How to remove the ModuleNotFoundError: No module named '
sql
sql query
sql query
SQL QUERY BROWSER
declare @cout00 int
declare @cout01 int...);
this is the
query i have written for the table "dpscomp" -
station date month...
but i m not
able to execute it as i want to count according to the conditions
SQL query
SQL query I need to combine two tables in order to get the values. As an example we have three tables
having namely usertable,job table and jobaccess table. In usertable (Userid,Empid,name,Role) details have been stored
sql syntax error help
sql syntax
error help this
query show syntax
error .. i am unable to figure it out
insert into order
(orderdate, dpname, paymethod, tamount...')
where is the
error ?
Please send the
error details and the datatype
SQL connection error in android
SQL connection
error in android hi,
i am android developer . recently i made one application connect with
sql server 2005 using jtds...:
sql:Exception : BUFFERDIR connection property invalid.
if you have any answer
my sql innodb
my sql innodb Write a java program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL
plz solve my query?
plz solve
my query? how to remove all the options from select control in html using java script?
JavaScript remove all items
<html>
<script language="javascript" >
function removeAllItems(selectbox
Update SQL Query Example
Update
SQL Query Example Hi,
I am beginner in
SQL (MySQL) and trying to learn Update
SQL Query with Example code. Can anyone explain me the
SQL Update
query with an example code?
Thanks
Hi,
A simple example