>I'm still struggling with this. I'm assigning the table names to variables based on the value of the company parameter passed from the form. I have to use the variable names in the SQL-SELECT statement to reference my tables. When I process the report, I receive alias not found messages. The error messages have the correct file name in them, such as alias apdist99 not found. I don't understand why it is interpreting the variables as aliases. Any ideas? Thanks again for your expertise! :) Here is my code:
>
> SELECT * DISTINCT;
> FROM apdist;
> LEFT OUTER JOIN apaddr;
> ON apdist.vendno = apaddr.vendno;
> LEFT OUTER JOIN apmast;
> ON apdist.vendno = apmast.vendno;
> LEFT OUTER JOIN apvend;
> ON apdist.vendno = apvend.vendno;
> LEFT OUTER JOIN Glacnt;
> ON apdist.glacnt = glacnt.glacnt;
> WHERE apdist.dtstat <> "V";
> AND apdist.dttype = "D";
> AND apmast.ppriority <> " ";
> AND apmast.paidamt > 0;
> ORDER BY apdist.vendno
Open tables in different scenarios with the same aliases. i.e. DE.Cursor.Alias is always the same, and DE.Cursor.CursorSource/Database is different.
Edward Pikman
Independent Consultant