Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 无法将此案例查询从blob转换为文本_Mysql_Blob - Fatal编程技术网

Mysql 无法将此案例查询从blob转换为文本

Mysql 无法将此案例查询从blob转换为文本,mysql,blob,Mysql,Blob,我想将这个blob查询输出转换为文本输出,这样我就可以在java数据表的hibernate上直接使用它。有人能帮我一下吗?我试着转换,但可能我错过了什么 select case when dp.idstatodocumentodipagamento = 4 and ( select count(*) from

我想将这个blob查询输出转换为文本输出,这样我就可以在java数据表的hibernate上直接使用它。有人能帮我一下吗?我试着转换,但可能我错过了什么

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设置代码的格式,这很难阅读。为了便于理解,我在缩进时做了一个尝试。谢谢你的缩进和破解