本帖最后由 superhanshuo 于 2017-5-22 19:07 编辑
finereport自带的数据库为sqlite
SQLite中,连接字符串不是使用+,而是使用||
所以连接字符串查询应为:
SELECT producerid,producername,(COUNTRY||'_'||CITY) AS AREA FROM PRODUCER
其他数据库可参考:
sqlserver:
select '123'+'456';
oracle:
select '123'||'456' from dual;
或
select concat('123','456') from dual;
mysql:
select concat('123','456');
注意:oracle和mysql中虽然都有concat,但是oracle中只能拼接2个字符串,所以建议用||的方式;mysql中的concat则可以拼接多个字符串。
|