SQL 'Insert Into' using Where clause

292 views
Skip to first unread message

Ti

unread,
Mar 31, 2010, 11:48:06 AM3/31/10
to MapInfo-L
Hi all,

Hopefully someone more knowledgeable can help me out here, I'm having
a problem with the following select statement:
Insert Into targetTab Select * From sourceTab Where rowid = 100

I got around around this by doing the following:
Select * From sourceTab Where rowid = 100 Into selectedRow Noselect
Insert Into targetTab Select * From selectedRow

Is my syntax just incorrect, or is MapInfo just not able to do an
Insert Into with a where clause in it?

Cheers.

Ti.

Lars I. Nielsen (GisPro)

unread,
Mar 31, 2010, 12:54:09 PM3/31/10
to mapi...@googlegroups.com
Hi Ti,

MapInfo SQL is limited, and one of the limtations is the absense of "where" in an "insert into - select" construct.

Your work-around is actually the (only) way to make it work. Just remember to close the table "selectedRow" to avoid cluttering Pro up with temporary tables.

Best regards / Med venlig hilsen
Lars I. Nielsen
GIS & DB Integrator
GisPro


Ti skrev:

Ti

unread,
Mar 31, 2010, 5:07:22 PM3/31/10
to MapInfo-L
Thanks Lars, I had a feeling that was the case. Writing around the
limitation resulted in a net speed increase anyway, so all's good!

On Mar 31, 5:54 pm, "Lars I. Nielsen (GisPro)" <L...@gispro.dk> wrote:
> Hi Ti,
> MapInfo SQL is limited, and one of the limtations is the absense of "where" in an "insert into - select" construct.

> Your work-around is actually the (only) way to make it work. Just remember to close the table "selectedRow" to avoid cluttering Pro up with temporary tables.Best regards / Med venlig hilsen Lars I. Nielsen GIS & DB Integrator GisPro

Reply all
Reply to author
Forward
0 new messages