Hi Tony,

It's not an SQL issue, it's a syntax issue. And your syntax is wrong.

Use this construct instead:
     dim T1 as string, T2 as alias
     T1 = "links_table"
     T2 = T1 + ".data"
     select * from T1 where T2 = 1

To use indirect adressing always use an alias variable.

Regards
Lars Nielsen

**********************************************************
Lars Nielsen                                [EMAIL PROTECTED]
Development Manager, MapXtreme iGIS Specialist
Kampsax / MapInfo GIS, Odense        http://www.mapinfo.dk
Authorized MapInfo Partner & Distributor in Denmark
Address: Rugaardsvej 55, DK-5000 Odense C
Telephone: +45 6313-5000           Facsimile +45 6313-5090
----------------------------------------------------------
GIS-hotel.dk                       http://www.gis-hotel.dk
----------------------------------------------------------
MapInfo Internet-GIS i Danmark       http://gis.mapinfo.dk
**********************************************************




"Tony Kelava" <[EMAIL PROTECTED]> on 26-04-2000 09:06:54

To:   [EMAIL PROTECTED]
cc:
Subject:  MI MapBasic and SQL???




I'm trying this in mapbasic:

     dim T as string
     T = "links_table"
     select * from T where T.data = 1


Which fails with an error message:
     unrecognized command.

It seams to be choking on the fact that T.date is really "string"."column"
and not really "table name"."column"

Fortunately for me in this case i can achieve what i want in other means,
but it seams to me to be a horrible limitation.

I tried:

select * from T as _table1 where _table1.data = 1

but that doesnt work either.

Is mapinfo's sql braindead or what!?

Know of any other ways to put table names contained in strings into
queries?


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




----------------------------------------------------------------------
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