79760971

Date: 2025-09-10 14:33:46
Score: 0.5
Natty:
Report link

After spending an entire afternoon going down the Google rabbit hole, I found a post here that referenced another post that appeared to be broken but the Wayback Machine came to the rescue here. After finding what I needed, I realized a couple of SO questions came close to providing an answer indirectly (here and here) but the information wasn't presented in a way I would have picked up on at the time.

For DB2 (i Series at least) use an "x" outside the single quotes with the hex string inside them, like so:

SELECT * FROM [schema].[tablename] WHERE fieldname=x'A0B1C2D3'

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Wildcat Matt