2

I would like know the easiest way (no coding) to extract the content of the blobs of a database.

For example, I have a table which contains a column whose format is BLOB. The result I would like to get is to extract the content of the BLOB into CSV files.

What is the most elegant method to do this? Is there a Sybase function to perform this? Or an existing software?

Thanks in advance,

1 Answer 1

1

For example, I have a table which contains a column whose format is BLOB. The result I would like to get is to extract the content of the BLOB into CSV files.

What is the most elegant method to do this?

BCP OUT will be your best choice.

  • Make sure your database has BLOB data (Image and/or TEXT datatypes). Also, select into should be set to TRUE for the database.
  • Check the MAX length of the BLOB data using select max(datalength(column_name)) from table_name. Alternatively, you can use this utility to do the same thing programatically.
  • Use the above max datalength as -T parameter in BCP OUT.

    -T text_or_image_size allows you to specify, in bytes, the maximum length of text or image data that Adaptive Server sends. The default is 32K. If a text or an image field is larger than the value of -T or the default, bcp does not send the overflow.

Is there a Sybase function to perform this? Or an existing software?

SybaseASE does not have a native function. Also, I am not aware of an existing software (there might be, but I did not have a need to use them for getting BLOB data out of my sybaseASE).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.