Mysql 无法将此案例查询从blob转换为文本
我想将这个blob查询输出转换为文本输出,这样我就可以在java数据表的hibernate上直接使用它。有人能帮我一下吗?我试着转换,但可能我错过了什么Mysql 无法将此案例查询从blob转换为文本,mysql,blob,Mysql,Blob,我想将这个blob查询输出转换为文本输出,这样我就可以在java数据表的hibernate上直接使用它。有人能帮我一下吗?我试着转换,但可能我错过了什么 select case when dp.idstatodocumentodipagamento = 4 and ( select count(*) from
select
case
when dp.idstatodocumentodipagamento = 4
and
(
select
count(*)
from
lineadocumentodipagamento lp
where
dp.iddocumentodipagamento = iddocumentodipagamento
AND idstatodocumentodipagamento = 5
) > 0
then concat
(
'Linee imponibile ',
IFNULL
(
(
select
count(*)
from
lineadocumentodipagamento lp
where
idstatodocumentodipagamento = 5
and lp.idcontocorrente <> 64
),
''
),
'/',
IFNULL(
(
select
count(*)
from
lineadocumentodipagamento lp
where
idcontocorrente <> 64
), ''),
' ; ',
'Linee IVA ',
IFNULL
(
(
SELECT
COUNT(*)
FROM
lineadocumentodipagamento lp
WHERE
idstatodocumentodipagamento = 5
AND lp.idcontocorrente = 64
),
''
),
'/',
IFNULL(
(
SELECT
COUNT(*)
FROM
lineadocumentodipagamento lp
WHERE
lp.idcontocorrente = 64
), '')
)
END as z
from
documentodipagamento dp,
lineadocumentodipagamento ldp
where
dp.iddocumentodipagamento = ldp.iddocumentodipagamento
解决添加
convert (count(*) using utf8)
请为每一个select设置代码的格式,这很难阅读。为了便于理解,我在缩进时做了一个尝试。谢谢你的缩进和破解