Remember a simple mistake.
sql.append("select"
+"a.MEMBER_NAME, b.ACTION_NAME"
+"from CLUB_MEMBER a,CLUB c, MEMBER_ACTION_RECORD d");
sql.append("WHERE a.CLUB_MEMBER_ID = d.CLUB_MEMBER_ID"
+ "AND a.CLUB_ID = b.CLUB_ID"
+ "AND d.ACTION_ID = ?");
It’s wrong, why is it wrong? No spaces, SQL prints.
selecta.MEMBER_NAME, b.ACTION_NAMEfrom CLUB_MEMBER a,CLUB c, MEMBER_ACTION_RECORD dWHERE a.CLUB_MEMBER_ID = d.CLUB_MEMBER_IDAND a.CLUB_ID = b.CLUB_IDAND d.ACTION_ID = ?
Now you know why it’s wrong, right?
Correct Codes.
sql.append("select"
+" a.MEMBER_NAME, b.ACTION_NAME"
+" from CLUB_MEMBER a,CLUB c, MEMBER_ACTION_RECORD d");
sql.append(" WHERE a.CLUB_MEMBER_ID = d.CLUB_MEMBER_ID"
+ " AND a.CLUB_ID = b.CLUB_ID"
+ " AND d.ACTION_ID = ?");
It doesn’t seem to make a big difference, but it’s enough to take half an hour and patience to look at the code.
Read More:
- About starting the service, you always get stuck in com. Alibaba. Druid. Pool. Druiddatasource | {datasource-1} initiated
- [error handling] idea error reporting com.alibaba.druid . pool.DruidDataSource error
- Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block collection
- Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.naming.NamingMaintainService
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the
- com.alibaba.fastjson .JSONException: For input string: “3000-01-01” or “9999-12-31”
- java.lang.AbstractMethodError: Receiver class com.alibaba.cloud.sentinel.feign.SentinelContractHolde
- Idea error: (4, 28) Java: package com.alibaba.fastjson does not exist
- [Solved] nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t o invoke the method findPage
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Hive SQL syntax error and corresponding solutions
- Provider: SQL network interfaces, error: 25 http://www.itsvse.com/thre
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
- Execution Error SQL_ERROR_INFO: near “.“: syntax error
- Mybatis custom list collection parser
- Cannot find module ‘body-parser’
- boot.asm:1:error:parser:instruction expected
- SAP SQL error “SQL code: -10692“ occurred while accessing table “ZTXXXX“.
- Syntax error: invalid syntax before Python string