Results 1 to 2 of 2

Thread: LIKE Join query

  1. #1
    Join Date
    Nov 2004
    Posts
    5

    Cool Unanswered: LIKE Join query

    Hi,
    Thank you for looking into this.

    I'm trying to have a query of this form:
    SELECT * FROM table1, table2 WHERE table2.ids LIKE '%table1.id%' AND table2.status = 'something'

    basically, I need to insert table1.id value into LIKE query. table1.id have one numeric value and table2.ids have varchar value like '1, 3, 344, 222'.

    Thanks again,
    Eugene

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the easiest thing would be to redesign the table so that you do not have a series of ids in a single column

    do a search for first normal form
    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
  •