I am trying to find duplicatemobile_number
that starts with “+” in the same table as:
Repo.all(from p in Parent, join: ps in PlusParent, where: ps.mobile_number == ^"+#{p.mobile_number}")
I am doing a join on the same table, but when I run the query I get error:
undefined function p/0
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
the error is because of:
where: ps.mobile_number == ^"+#{p.mobile_number}"
how can I use p inside dynamic string within query as above?