[This topic is migrated from our old forums. The original author name has been removed]
In DB2 we can query on CHAR FOR BIT DATA fields by wrapping the numeric/textual value of the field in x'my field value'.
SELECT * FROM employee WHERE employee.emp_id = x'20021005115858397837000000' ;
Currently, if we copy and paste a CHAR FOR BIT DATA id value from the data grid and paste it into the SQL command editor we get only the value.
What I'd like to see is the value being displayed as it is currently but for the text editor to recognise the pasting of a different "Data Flavour" and when it pastes the CHAR FOR BIT DATA value it automatically adds the conversion characters at the beginning and end.
Perhaps an easier alternative is to have the copy action adding the characters around the value. That would make it more flexible as I'd be able to paste the "safe" value straight into a spreadsheet for instance.
It would make copy and paste of these values nice and seamless.
It would also be nice to default to this scheme in exports. Most exports I do end up in CSV files that will be opened in MS Excel. Excel treats our ID fields as long numbers and mangles them into something like this"2.00210051158583E+25".
With the x'' characters around them, Excel treats them like strings and they're kept safe. We can achieve this manually through the export settings but it would be useful for DBVis to default this for us.
almost 14 years ago
[This reply is migrated from our old forums.]
Re: Copy and Paste of CHAR FOR BIT DATA
I'll add this request to the feature list.