Select query in Advanced SQL Filter
737738Nov 29 2009 — edited Feb 12 2010Hi All
I am creating a shared filter and I need to write an sql statement for a column. Can I use
string functions in the Advanced SQL Filter. My sql query is :
select distinct "Exchange Rate"."Type" from "Credit"
where substr(rtrim("Exchange Rate"."Type"),-1,2) in (select distinct substr(rtrim( "-Year"."Year Name"),-1,2)
from "Credit" where CURRENT_DATE between "-Year"."Year Start Date" and "-Year"."Year End Date" )
where, "Credit" = Name of the subject area
"Exchange Rate" and "-Year"= presentation tables
I'm getting the error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <select>: Syntax error [nQSError: 26012] . (HY000)
I then tried a simple query in the Advanced SQL Filter: "Exchange Rate"."Type" = SELECT "Exchange Rate"."Type" FROM "Credit"
which does not work either.
Can't seem to debug the problem.
Thanks