Contents
Can a blob be converted to a string?
I have a text string stored as a BLOB data type in a database. I want to extract it by an SQL select query, but I have problems converting/casting from BLOB to readable text.
Why are blob fields unreadable in SQL Server?
Problem was apparently not the SQL server, but the NAV system that updates the field. There is a compression property that can be used on BLOB fields in NAV, that is not a part of SQL Server. So the custom compression made the data unreadable, though the conversion worked.
How to convert from SQL Server geometry blob to something?
Now if you treat that as a temp table and wrap some SQL around it, you have a column with the WKB in there and you can convert it to varbinary as suggested above: where temp.wkb can be the column in your larger table containing the WKB values from the CSV
How to convert varbinary to Base64 in Transact-SQL?
XQuery (XML Query) is a query language designed to query XML data. Transact-SQL supports a subset of the XQuery language, which can be used for querying xml data type. For more information you can check the links In most cases we will need to work on multiple rows in table, and we want to convert only the VARBINARY data into BASE64 String.
This is important especially when the response indicates an error occurred and the description of the error is stored in that Blob. Hence, you are hard-pressed to read the content of the Blob. To read it, you need to convert it to a string — and one easy way of doing that is using the FileReader API.
When to use blobs instead of plain text?
Sometimes we get Blobs instead of plain text as responses when getting a resource from an API. This is important especially when the response indicates an error occurred and the description of the error is stored in that Blob. Hence, you are hard-pressed to read the content of the Blob.
What does a blob object mean in JavaScript?
A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn’t necessarily in a JavaScript-native format. ( https://developer.mozilla.org/en/docs/Web/API/Blob) Sometimes we get Blobs instead of plain text as responses when getting a resource from an API.