Am using jamdb_oracle to connect to my oracle db… but am having issues
here is a query i wrote

def cust_signture(cust_no) do

query = "sign_img, cif_id FROM fc122sup.acvw_vendor_sign_access where CIF_ID= :1"

case OracleRepo.query(query, [cust_no]) do

  {:ok, %{columns: columns, rows: rows}} ->

    result = Enum.map(rows, &Enum.zip(columns, &1)) |> Enum.map(&Enum.into(&1, %{}))

    {:ok, result, "Query successful. Result: #{inspect(result)}"}

  {:error, reason} ->

    {:error, "An error occured saving mandate message", query <> inspect(reason)}



response am getting

** (ArgumentError) argument error
(stdlib 3.11) :ets.lookup_element(Ecto.Registry, nil, 3)
(ecto 2.2.12) lib/ecto/registry.ex:17: Ecto.Registry.lookup/1
(ecto 2.2.12) lib/ecto/adapters/sql.ex:251: Ecto.Adapters.SQL.sql_call/6
(cts 0.1.0) lib/cts/transactions.ex:1378: Cts.Transactions.cust_signture/1

SELECT keyword is missing

1 Like