1

I have a column in MySQL which has the datatype BLOB. I am using Crystal Reports for some reports.

My problem is BLOB column will show blank data if it contains data other than a picture.

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
luchaninov
  • 6,792
  • 6
  • 60
  • 75
vissubabu
  • 493
  • 4
  • 11
  • 25

1 Answers1

0

try this,

SELECT CAST(key_initiatives AS CHAR(1000) CHARACTER SET utf8 )  AS key_init FROM OBJSETTING_FOCUS_ON_CUSTOMER
ravikumar
  • 893
  • 1
  • 8
  • 12
  • Hi Ravi,This is working but I need to store as max characters as I can.How much data that we can store in this text ?.Please suggest is there any other possibilties – vissubabu May 13 '14 at 11:26
  • A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 – 1) characters. you can see maximum length the data types http://dev.mysql.com/doc/refman/5.0/en/string-type-overview.html – ravikumar May 13 '14 at 11:32
  • Hi Ravi can you please suggest how I can use text type in above query.Please help – vissubabu May 13 '14 at 11:34
  • @user2846028 I think query does the same thing what you expecting to use – ravikumar May 13 '14 at 11:40
  • Hi ravi I dint got what you are telling .Please explain – vissubabu May 13 '14 at 11:42
  • @user2846028 your question statement says to convert the Blob to longtext.I think the query does the pretty same thing – ravikumar May 13 '14 at 11:46
  • Hi Ravi so you mean to say I can take char also.Suppose if the data is more than 255 characters Will I get the data as char will hold only 255 characters – vissubabu May 13 '14 at 11:50