I don't know if this is a problem in your database structure (does
field1 exist in table1) or in Unidac or perhaps a typo in the SQL,
since you aren't posting your literal SQL or error message (as
indicated in your StackOverflow post of this problem, macro1 is
really ",(select sum(filed1) from table2 where
table2.code=table1.code) as test ", which is significantly different
from what is written below, and which is again not the real SQL since
if you are using "table1", "table2", and "filed1" as names, there are
other problems :-) ).
Please copy and paste the _actual_ lines of code from your program,
and the schema of the table, so we can take a look at it and see
what's going on.
BTW, this is probably not the problem, but is it really necessary to
use a macro here? Wouldn't it be easier to write:
SQL.text := 'select ' + FieldList + ' from table1 where ' + WhereClause;
and set FieldList and WhereClause to whatever you want before the
assignment to SQL.text?
At 12:52 AM 10/7/2013, a.nouri wrote:
I have query :
select ¯o1 from table1
where ¯o2
delphi code:
macrobyname('macro1').value := 'field1,field2';
macrobyname('macro2').value := 'field1=1';
i got an error like this:
Unknown column filed1 in where clouse
best regards,
nouri
_______________________________________________
Delphi-DB mailing list
Delphi-DB@lists.elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db
_______________________________________________
Delphi-DB mailing list
Delphi-DB@lists.elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-db