Showing posts with label programmatically. Show all posts
Showing posts with label programmatically. Show all posts

Thursday, March 22, 2012

Does 'SELECT INTO' not work in SQL Mobile?

I'm trying to programmatically create a new table that is a copy of another. The SQL statement I'm making is:

"SELECT * INTO sensor_stream_temp FROM sensor_stream"
and various combinations thereof (such as specifying the columns, etc)

The error I keep getting is:
There was an error parsing the query. [Token line number 1, Token line offset 10, , Token in error = INTO ]

Is it not possible to copy a table using this statement? *sigh*
Thanks in advance for any help.
-Dana
OK, so it looks like "INTO" is not allowed in SQL Mobile; how do I make a copy of a table?

|||

Try this:

INSERT INTO sensor_stream_temp (SELECT * FROM sensor_stream);

Note: Both sensor_stream_temp, sensor_stream MUST be of similar.