GBase 8s
其他
文章

数据关联查询结果混乱,出现错误转义数据

发表于2025-09-12 11:28:2981次浏览6个评论

现有两张表(表a,表b),数据如下

表a:

表b:

查询sql如下:

select
    b.id,
    b.levels,
    (select a.code_name from a where a.code = b.levels and a.types = 'test') as level_name,
    b.others_id,
    (select a.code_name from a where a.code = b.others_id and a.types = 'ttta') as others_name
from b
order by id desc 

得到结果如下,出现转义错误数据:

评论

登录后才可以发表评论
hugolin发表于 10个月前
查下具体版本,select dbinfo('version_gbase','full') from dual;
我这未出现你那边情况:
用户头像
liaosnet发表于 10个月前
数据库版本是啥?
A灬皮卡皮卡皮发表于 10个月前
@liaosnet:GBase8sV8.8_TL_3.3.0_2_36477d
GBase8sV8.8_TL_3.6.3_3X1_1_e10e03
这两个版本都存在这个问题
崔哥发表于 6个月前
兔园标物序,惊时最是梅。衔霜当路发,映雪拟寒开。枝横却月观,花绕凌风台。朝洒长门泣,夕驻临邛杯。应知早飘落,故逐上春来。
崔哥发表于 3个月前
楼上黄昏欲望休,玉梯横绝月中钩。芭蕉不展丁香结,同向春风各自愁。东南日出照高楼,楼上离人唱石州。总把春山扫眉黛,不知供得几多愁?
GBase用户51934发表于 2个月前
闪闪发光