Toad World® Forums

Display MySQL VARBINARY as character


#1

I’m working with a MySQL database (MediaWiki) that uses VARBINARY all over the place for text fields. I’d like to get those to automatically display as character strings in the query results grid. I was hoping that I could do that with the custom data type formatting options, but I can’t seem to make that work.

I’ve got any entry for:
MySQL:VARBINARY / String /

But what’s an appropriate Format String to use for something like this, where it isn’t a DateTime format, but just a string.

In a query, I have to do CAST(field AS CHAR(100) CHARSET UTF8) to make it display the way I want.


#2

Custom data type formatting option only applies to the data types taking format string. In your case, I suggest you create views to wrap the varbinary columns as varchar columns, then work with views instead of the tables directly.