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 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









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
My SQL upgrade to version 5.5 issue
My SQL upgrade to version 5.5 issue  My SQL upgrade to version 5.5 issue
Advertisements
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
My Sql Error - Development process
My Sql Error  Hello Sir ,I have Created Table with following Query...,Its Very Very Urgent. Thank u very Much for urs Great Support in My project. Query CREATE TABLE `timetable` ( `busno` int(255) default NULL, `source
how to call list objects as string into my sql query?
how to call list objects as string into my sql query?  how to call list data as string into my sql query so that i can retrieve all values from database? List has data retrieved from xml(using xmlSAXparser
how do i use sql like query in my jsp page
how do i use sql like query in my jsp page  how do i use sql like query in my jsp page   Hi Friend, Try the following code:ADS_TO_REPLACE_1 <%@ page import="java.sql.*"%> <% Class.forName
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
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
My SQL
My SQL  Connection class for MySQL in java
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
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 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  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
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
upgrading sql query join
upgrading sql query join  upgrading sql query join
SQL Error - SQL
SQL Error  Invalid character value for cast specification on column number 5 (Designation) Whats this error about this if the field i specified in programming error. ie DB fields in above question
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
SQL Query  Hi I would like to know how to create a SQL query which would copy values from a field which contains multiple values to an existing... | +-----+-----------+-------------+ Query: INSERT INTO table2 (fruit1, fruit2, fruit3
query - SQL
and the other is employee in my database. in user_details i have given a userid varchar... of my proj.And in employee table also i have to give userid,username... tell me how to write the query in database but not jsp code. thank u
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
optimize sql query
optimize sql query  How to optimize sql query in mysql? Thanks
sql query - JDBC
sql query  I need a SQL query to add data into database
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
UNICODE or SQL statement issue - JDBC
nothing ...... I had also change my backhand to SQL SERVER but retrieves same...UNICODE or SQL statement issue  Hi again............ I have got something new that........... i was using MS Access as the database with my
sql query - SQL
sql query  hi sir,i have a month and year numbers,when i am enter a month and year in sql query then i want results for 1st day of month to last day of month in that year for that month plz provide a solution
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
SQL Error Version 5.5.15
SQL Error Version 5.5.15  SQL Error Version 5.5.15
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
ModuleNotFoundError: No module named 'sql_query_dict'
ModuleNotFoundError: No module named 'sql_query_dict'  Hi, My... 'sql_query_dict' error? Thanks   Hi, In your python... 'sql_query_dict' error will be solved. Thanks
SQL query - SQL
SQL query  hi sir/Madam i am using MS Access where i have table like Fees_Struc: Amount (INT) Due_Date (Date) Fees_Pay: Paid(INT) Student_Bal: Panalty(INT) my problem is when the Due_date is equal
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query
SQL QUERY - JDBC
SQL QUERY  I m running a query using apache tomcat the sql query is on adding an employee in the database whenever i click on add after inserting the values i am getting a java.lang.nullpointer exception
display sql query in hibernate
display sql query in hibernate  If you want to see the Hibernate generated SQL statements on console, what should we do
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 query from oracle
Sql query from oracle  Please help me that I want to get the table names form the existing database who does it having eid coloumn plz provide me query in oracle database
SQL error - JSP-Servlet
SQL error  Hello friends, Can we update a column with referrence to that column value. For example, the query... is the value to be replaced. This modification is neccesary one for my project
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
I am not able to display the selected value of my combobox
I am not able to display the selected value of my combobox   <?php echo "<select name=\"hello\">\n"; echo "<option value=\"NULL\">... units order by unitcode"; $rsrcResult = mysql_query($strQuery); $i=1
My sql - JDBC
My sql  hi, I have a table in MySql, having fields, emp_id,emp_name,emp_vertical,emp_supervisor. i need a JDBC program with driver mangager for MySQL, statements, preparedstatements,resultset. Please can you suggest me a way
Named ? SQL query in hibernate
Named ? SQL query in hibernate  What is Named SQL query in hibernate... putting the sql queries to various places in between code. sample.hbm.xmlADS...; </property> </class> <query name
SQL Query - JSP-Servlet
SQL Query   AS mysql backend updation query shows a syntax error. I gave the full query and the generated error here. Please send me the correct query anyone. st.executeUpdate("update stud_detail set name='"+newname
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
sql query search function
sql query search function  i have a textbox on a form , i like a search a data in the form, when i give whatever name and id or etc..its will search and show the same form , so help me using jsp
I GOT ERROR FOR MY PROJECT
I GOT ERROR FOR MY PROJECT  Dear Friend/ RoseIndia Team, Firstly I would to thank u Guys help me so many time.. I got error on my little project when running at server. please correctly my error Guys... ERROR CODE: "LOGIN
For my website,As soon as the user is able to succesfully login, a Testimonial form appears.
For my website,As soon as the user is able to succesfully login, a Testimonial form appears.  For my website,As soon as the user is able to succesfully login, a Testimonial FORM appears in the same page. How to do. Please Help

Ads