select SQL where data contains a hex value

pts.
Tags:
SQL
I have a file/table with 3 fields. The first field is a batch #, the second field is a record #, and the third field contains data. I need to select from the third field where it contains a hex value of X'0A' which doesn't relate to any character on the keyboard. Can someone show me how to do a select like this, please! Thanks for your assistance.

Answer Wiki

Thanks. We'll let you know when a new response is added.

SELECT * FROM file WHERE third_field LIKE ‘%’ || X’0A’ ||’%’

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Robaan
    How would you be able to tell the difference between the newline character (X'0A') and a the last field that contained an X'0A'?
    0 pointsBadges:
    report
  • TheQuigs
    Depending on your database, you could try using select * from file where hex(datafield)='0A'
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following