1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to match an alphanumeric string data in a field?

Discussion in 'Databases' started by wonder_gal, Dec 1, 2005.

  1. #1
    I would like to return a total number of records from a table in which their 'inMessage' field matches the a string with a format like this, eg. "55 213 aaa 58"
    Can anyone tell me how shall i write the sql statement?

    SELECT COUNT(*) AS Total FROM Inlog WHERE Message LIKE '???'
    Code (markup):
    What shall i put as my comparison parameter?
    wonder_gal, Dec 1, 2005 IP
  2. Michau

    Michau Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    Do you want to find all the fields that contain these characters as a substring? Then you would write LIKE '%your_substring%';
    Michau, Dec 5, 2005 IP