Joining tables with LIKE (SQL)

后端 未结 1 1244
余生分开走
余生分开走 2021-01-11 11:51

First of all I am using Oracle:

Table One Name = tableone

Table Two Name = tabletwo

tableone has a column name

相关标签:
1条回答
  • 2021-01-11 12:02

    Try this syntax instead:

    select * 
    from tableone 
       join tabletwo on tableone.pizzaone like ('%' || tabletwo.pizzatwo || '%')
    

    Oracle's string concatenation operator is the double pipe (||). The invalid number error is because Oracle expects numeric operands for the '+' operator.

    0 讨论(0)
提交回复
热议问题