mysql语句出现数据库出现问题

问题描述

mysql语句出现数据库出现问题

PreparedStatementCallback; bad SQL grammar [select (select name from vs_base_orga where id=(select pid from vs_base_orga where id=o.orgaid )) as orga_name ,(select name from vs_base_orga where id=o.orgaid )as depart_name,sum(t.acco_should)as acco_should,sum(t.acco_provide)as acco_provide,sum(t.acco_accumulation)as acco_accumulation,sum(t.acco_medical)as acco_medical,sum(t.acco_unemployment)as acco_unemployment,sum(t.acco_person)as acco_person,sum(t.acco_deductions)as acco_deductions,sum(t.acco_other_sub)as acco_other_sub,sum(t.acco_actual)as acco_actual,(t.acco_date)as acco_datefrom vs_base_oum o,tc_account t where t.id=o.userid'10e58a7c47624a999b400028b25b5f2f' and t.acco_date >='2015-11-01' group by orga_name,depart_name']; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'vs_base_oum o,tc_account t where t.id=o.userid'10e58a7c47624a999b400028b25b5f2f'' at line 1

解决方案

关于在myeclipse中执行mySQL语句出现问题
mysql++安装出现问题
python 连接mysql 出现问题

解决方案二:

已经提示了呀,这个:where t.id=o.userid**'10e58a7c47624a999b400028b25b5f2f'** and t.acco_date........ 这个地方是怎么回事啊

解决方案三:

同上,提示说where t.id=o.userid**'10e58a7c47624a999b400028b25b5f2f'** and t.acco_date........ 有语法错误啊

时间: 2024-08-31 15:40:56

mysql语句出现数据库出现问题的相关文章

PHP中常用到的一些MySQL语句

在PHP开发中,经常会使用到MySQL语句,下面就为您列举了一些经常使用的MySQL语句,希望对您平时的学习和开发工作能起到些许的作用. MySQL语句显示数据库或表: show databases;//然后可以use database_name; show tables; MySQL语句更改表名: alter table table_name rename new_t; MySQL语句添加列 : alter table table_name add column c_n column attr

数据库-小白 求大神解答 eclipse连接mysql语句改成连接sql2008

问题描述 小白 求大神解答 eclipse连接mysql语句改成连接sql2008 package library; import javax.swing.*; import java.sql.*; public class Database{ private String url = "jdbc:mysql://localhost/library";// //private String url = "jdbc:mysql://localhost:3306/library&

数据库-关于原生mysql语句多表查询更新字段问题 求大神解答

问题描述 关于原生mysql语句多表查询更新字段问题 求大神解答 如题:a表user_id school_id1233 220132346 220172344 234452247 22017... ... b表user_id term2346 12346 12346 22247 21233 1... ... 如上两张表:根据a表中的school_id=22017 得到它的user_id 然后根据此user_id得到b表中的term 并把term=1的变为term=2,把term=2的变为term

mysql-求一个Mysql语句 查询出当前周的数据按照天分组

问题描述 求一个Mysql语句 查询出当前周的数据按照天分组 SELECT DATE_FORMAT(uploadTime_beg%Y-%m-%d"") as time SUM(field01) as sumStatus1 SUM(field02) as sumStatus2 SUM(field03) as sumStatus3 SUM(field04) as sumStatus4 SUM(field05) as sumStatus5 FROM health_realdata WHERE

通过索引优化含ORDER BY的MySQL语句

通过索引优化含ORDER BY的MySQL语句 关于建立索引的几个准则: 1.合理的建立索引能够加速数据读取效率,不合理的建立索引反而会拖慢数据库的响应速度. 2.索引越多,更新数据的速度越慢. 3.尽量在采用MyIsam作为引擎的时候使用索引(因为MySQL以BTree存储索引),而不是InnoDB.但MyISAM不支持Transcation. 4.当你的程序和数据库结构/SQL语句已经优化到无法优化的程度,而程序瓶颈并不能顺利解决,那就是应该考虑使用诸如memcached这样的分布式缓存系统

用PHP连mysql和oracle数据库性能比较

mysql|oracle|比较|数据|数据库|性能 用PHP连mysql和oracle数据库性能比较 测试硬件说明:测试使用的是我的爱机,配置如下:CPU:C433内存:128M硬盘:酷鱼2代20G 测试软件说明:WIN32下用的是windows nt server4,sp5,apache 1.3.12,php3.0.15和php4rc1,mysql 3.22.29,oracle 8.0.5linux下用的是bluepoint linux1.0, apache 1.3.12, php4rc1,m

用PHP和MySQL构建一个数据库驱动的网站(六)

mysql|数据|数据库 摘要 在这一章内我们会学习到如何在一个Web页面中向数据库中存储信息并显示它. (2002-08-29 14:11:25) --------------------------------------------------------------------------------By Wing, 出处:Linuxaid 第四章: 用PHP访问MySQL数据库 在这一章内我们会学习到如何在一个Web页面中向数据库中存储信息并显示它.之前我们已经安装了MySQL这个关系

Mysql的主从数据库没有同步的解决办法

今天发现Mysql的主从数据库没有同步 先上Master库: mysql>show processlist; 查看下进程是否Sleep太多.发现很正常. show master status; 也正常. mysql> show master status; +-------------------+----------+--------------+-------------------------------+ | File | Position | Binlog_Do_DB | Binlo

mysql如何更新数据库字段教程

  mysql如何更新数据库字段教程 语法 UPDATE table_name SET column_name = new_value WHERE column_name = some_value 注释:SQL 对大小写不敏感.UPDATE 与 update 等效. 为了让 PHP 执行上面的语句,我们必须使用 mysql_query( 函数.该函数用于向 SQL 连接发送查询和命令. 例子 稍早时,我们在本教程中创建了一个名为 "Person" 的表.它看起来类似这样: FirstN