BLOB到MySQL中的长文本转换
问题描述:
我在MySQL中有一列,其数据类型为BLOB.我正在使用Crystal Reports生成某些报告.
I have a column in MySQL which has the datatype BLOB. I am using Crystal Reports for some reports.
我的问题是,如果BLOB列包含除图片以外的数据,它将显示空白数据.
My problem is BLOB column will show blank data if it contains data other than a picture.
我从数据库获得的数据仅为文本.因此,我想将BLOB列转换为其他数据类型,这些数据类型将占用BLOB对象之类的更多数据.
The data I am getting from DB is text only. So I want to convert the BLOB column to some other datatype which will occupy more data like BLOB object.
请提出我可以建议的数据类型.
Please suggest what datatype I can conevrt.
我尝试了此查询,但是它不起作用.
I tried this query but it is not working.
SELECT CAST(key_initiatives AS MEDIUMTEXT) key_init FROM OBJSETTING_FOCUS_ON_CUSTOMER
答
尝试一下,
SELECT CAST(key_initiatives AS CHAR(1000) CHARACTER SET utf8 ) AS key_init FROM OBJSETTING_FOCUS_ON_CUSTOMER