Error trying to retreive data from table in substructure search using Npgsql

15 views
Skip to first unread message

alber...@gmail.com

unread,
Sep 16, 2016, 8:44:16 AM9/16/16
to indigo-dev
my sql sentence
 "select distinct phm_data.pm_code as code, phm_cf.mol_id as id from bingo.phm_data, bingo.phm_batchdata phmbatch, bingo.structures s where (s.smiles @('C12CCCC1CCC2','')::bingo.sub) and phm_cf.mol_id = s.mol_id and phm_cf.mol_id = phmbatch.batch_link_id  order by pm_code"

works in pgAdmin but when connecting through Npgsql I get the following error "operator does not exist: text @ sub".
Other sql not involving subsearch also works perfectly with Npgsql. So the problem must be with the syntax of the smile sub search

ord...@omegachem.com

unread,
Jan 19, 2018, 8:22:37 AM1/19/18
to indigo-bugs
What about using bingo.SearchSub instead:

select $table.* from $table, bingo.SearchSub('$table', $query, '$parameters; TOP $n') t
   where $table.$id = t.id;


David
Reply all
Reply to author
Forward
0 new messages