Changed to use bindvar to cater for postgres using a different bind char