ZEOSDBO-7.1.3a-stable
Lazarus v1.2.4-fpc-2.6.4-win32
Database: Personal Oracle Database 11g Release 11.2.0.3.0 - 64bit
When I create query I'm using oracle schema, and my query looks like:
Code: Select all
select t1.*
from
&schema.table_name t1
where
t1.id = :p1
&filter
Code: Select all
var
Query: TZQuery;
...
Query.SQL.Text :=' select t1.*
from &schema.table_name t1
where
t1.id = :p1
&filter'
ParamByName('p1').Value := 10;
MacroByName('schema').Value := 'MySchema';
MacroByName('filter').Value := ' AND t1.Name = ''''somename''';
Code: Select all
select t1.*
from
MySchema.table_name t1
where
t1.id = :p1
AND t1.Name = 'somename'
Now I'm using StringReplace to set &schema and &filter in query.
Maybe in the components have similar functionality macros