Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Posts
    14

    Question Unanswered: SQL query on one field with multiple values

    I have an MSAccess query linked to a SharePoint list. One of the list fields allows the user to select multiple items. This is what the table looks like:

    CLIENT # CODE
    111111 ;#won
    222222 ;#lost
    333333 ;#won;#transfer
    444444 :#lost

    I need to develop a query that will only pull those transactions where the deal was won. This is what I expect to see:

    CLIENT # CODE
    111111 ;#won
    333333 ;#won;#transfer

    I've tried the 'like' function but can't get it to work. What am I doing wrong? any help would be greatly appreciated!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    SELECT ... WHERE code LIKE '*#won*'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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