Sql - Check If A Tick Mark Exists In A String

View Other Tips        Iphone Apps

  Posted by Guest - Sql - Check If A Tick Mark Exists In A String :
I need to know if byte 1 in my sql has a tick mark (single quote).  How do I handle this properly in SQL with DB2?

Select * from Tab_1
Where substr(field1,1,1) = '''

Doesn't work obviously, if my value is 6 bytes and its:

It should return in the result

Guest Says:
The correct way to do this in SQL is:

Select * from Tab_1
Where substr(field1,1,1) = ''''

Yeah thats 4 single quote marks in a row.

Add your reply below ...

This site allows you to ask questions and get answers from various posters. You may also answer any posts if you feel like you have input to give. Feel free to ask for help with any new question you wish, but most of the questions here are tech related. You will find many questions and answers related to your Ipod or Ipod Nano, Itunes, audio and video converting, spyware or adware cleanup, pc or other computer questions, and even mainframe questions. Although these are the tech questions most often asked, you will find help on almost any computer or software related subject. Feel free to go to the main menu and review the posts already present, or feel free to ask your own question. (Some questions will be closed once the moderator feels they are sufficiently answered and that no other input is needed).

"BlurBorder" - Get the app

  • Square any photo instantly.
  • Creates blurry border effects.
  • Also includes faded border effects.
  • For Iphone, Ipod, and Ipad.

  • Your Name:

    Your Reply:

    Type in verification code:

    Front Page

    Spyware/Task Database

    Computer Tips (Main Page)