You wrote:

I am facing one problem with SQL, I want to join two tables, and they have
a join
condition as well. the problem is table name (oone of them) is variable,
like the table name is like that sales9902 (sales of feb 99, here 9902 will
keep on changing and
the table with which I want to join has say WD field common, so the problem
is
if I am using given syntex it works

Select * from sales9902, depots where sales9902.wd = depots.WD into xxx

(where I have variable nyymm = 9902 so table name is like "sales"+nyymm

if I assign "sales"+nyymm+".wd"

or make another variable sztable1 = "sales"+nyymm+".wd"

Select * from sales9902 , depots where  sztable1 =depots.WD into yyy

then it says there is no join clause specified

Answer:

Try using a Run Command statement.  First construct the select statement in
a string variable and then run that variable.  It should run without any
error.

Cindy
MapInfo Technical Support


----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to