The SQL statement contains the multiplication number and returns an error.

Source: Internet
Author: User

The SQL statement contains the multiplication number and returns an error.

In ADO, we need to use multiplication in SQL statements. However, after '*' is added, an error always occurs when the program is executed, this is because '*' overlaps with the '*' keyword in SQL, so compilation will fail.

Solution: place the multiplication operation outside the SQL statement, put the result into a variable, and then reference it in the SQL statement.

Int count = (this. aspNetPager1.CurrentPageIndex-1) * this. aspNetPager1.PageSize; string SQL = "select top" + count + "E_Id from Emp order by E_Id asc"; // custom SQL statement


SQL statement Error

Select * from user-info a left outer join buyer-in B on a. buyerid = B. buyerid where a. Aname =?

You have renamed the table and used the table name, so an error is prompted. Use the transfer statement!

When I run an SQL statement in mysql, the following error is returned:

According to your method: CLASS_CODE_DELIMITER NATTONAL
The array name is incorrect. You must add an underscore "_" in front of NATTONAL "_",
Or rename your array name. And try again.
(The key is not to add spaces in the middle of the name)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.