Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Search string in database field

    Hi,

    Is it possible to search for a particular string within a database field,

    for example string = 'Program Finished' field name = 'Output'

    if so how?

    Any help would be good.

    Thanks in advance.

  • #2
    Regular Coder
    Join Date
    Jun 2005
    Posts
    804
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    SELECT
     column
    FROM
     table
    WHERE
     output LIKE '%Program Finished%'
    The above will return all rows where the output column contains the string anywhere within it. The LIKE keyword indicates a non-exact search, and the '%' characters are wildcards that let the database know that there can be any number of unknown characters before or after the string you're searching for.

  • #3
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for that, i'll have a go at it.

  • #4
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •