ion of SQLite Database
> Subject: Re: [sqlite] INSERT INTO with SELECT
> Message-ID:
> Content-Type: text/plain; charset=us-ascii
>
>
> On 5 Apr 2012, at 1:36am, Pete wrote:
>
> > Here's my test:
> >
> > CREATE TABLE t2 (Col1 text,Col2 text);
>
On 4/5/2012 1:09 PM, Simon Slavin wrote:
On 5 Apr 2012, at 6:05pm, Simon Slavin wrote:
I don't understand what you think is wrong with
insert into t3 SELECT Col1 FROM t2;
Oh, now I do. Okay, SQLite insists on the number of columns matching when you
use a sub-SELECT
So you could just do
On 5 Apr 2012, at 6:05pm, Simon Slavin wrote:
> I don't understand what you think is wrong with
>
> insert into t3 SELECT Col1 FROM t2;
Oh, now I do. Okay, SQLite insists on the number of columns matching when you
use a sub-SELECT even though it doesn't when you use the bracketed form where
On 5 Apr 2012, at 5:33pm, Pete wrote:
> Thank you Igor and Simon, I think I understand this now. On reading the
> docs more closely, it looks like the scond test case (NOT NULL with a
> DEFAULT) could be solved by using INSERT OR REPLACE. I'm wondering if
> there might be a way to solve the fi
On 4/5/2012 12:33 PM, Pete wrote:
Thank you Igor and Simon, I think I understand this now. On reading the
docs more closely, it looks like the scond test case (NOT NULL with a
DEFAULT) could be solved by using INSERT OR REPLACE.
I don't see how.
I'm wondering if
there might be a way to solve
n Thu, Apr 5, 2012 at 9:00 AM, wrote:
> Message: 10
> Date: Thu, 5 Apr 2012 01:38:57 +0100
> From: Simon Slavin
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] INSERT INTO with SELECT
> Message-ID:
> Content-Type: text/plain; charset=us-ascii
>
>
On 5 Apr 2012, at 1:36am, Pete wrote:
> Here's my test:
>
> CREATE TABLE t2 (Col1 text,Col2 text);
> insert into t2 (Col1) values('xxx');
> select * from t2
> xxx|
>
> CREATE TABLE t3 (Col1 text,Col2 text default 'abc');
> insert into t3 SELECT * FROM t2;
> select * from t3;
> xxx|
>
> Why do
I'm seeing something that doesn't look right when using the SELECT form of
the INSERT statement.
Here's my test:
CREATE TABLE t2 (Col1 text,Col2 text);
insert into t2 (Col1) values('xxx');
select * from t2
xxx|
CREATE TABLE t3 (Col1 text,Col2 text default 'abc');
insert into t3 SELECT * FROM t2;
Hello Brian,
you do not need a VALUE keyword in this case.
INSERT INTO "subscribers_new"
--VALUES <- remove this
SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
See the syntax diagram for the insert command:
http://www.sqlite.org/lang_insert.html
Martin
Brian Zambrano
Can anyone explain to me why an insert with select statement isn't working?
I know in my my example below I just have an extra column which I could have
added, but my actual tables are a bit more complex and this below is just to
demonstrate the problem.
-- Original table
CREATE TABLE "subscribers
On 11/16/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
My text file is only an intermediate and I can make the way I want.
I need to move data from Interbase to SQLite. Fastest method sofar is:
IB > ADO recordset
ADO recordset > text file
Import text file with SQLite .import command
Problem with .
uotes.
RBS
-Original Message-
From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
Sent: 16 November 2006 04:24
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] INSERT INTO with SELECT
You should create your database and your table first.
Do that in sqlite3.exe using your create table statement
You should create your database and your table first.
Do that in sqlite3.exe using your create table statement below.
What format is your text file in? What separates one field from another?
On 11/14/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
Thanks and in fact I had a look at your text import
aking the .db file and the
table nil happened, so no data moved.
RBS
-Original Message-
From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
Sent: 14 November 2006 14:06
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] INSERT INTO with SELECT
On 11/13/06, RB Smissaert <[EMAIL PROTECTED]>
On 11/13/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
OK, thanks for the reply.
I am using the same construction to write directly from Interbase to Access
and that works fine.
I'm surprised. Learn something every day!
I can make an ADO recordset first from the Interbase
data and write that to
PROTECTED]
Sent: 14 November 2006 03:24
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] INSERT INTO with SELECT
On 11/13/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
> Trying to move data from Interbase to SQLite via the ODBC driver and ADO
and
> having trouble to get the right sy
On 11/13/06, RB Smissaert <[EMAIL PROTECTED]> wrote:
Trying to move data from Interbase to SQLite via the ODBC driver and ADO and
having trouble to get the right syntax for the INSERT INTO statement.
This is what I have now, but it fails with the error: only one SQL statement
allowed.
I notice
Trying to move data from Interbase to SQLite via the ODBC driver and ADO and
having trouble to get the right syntax for the INSERT INTO statement.
This is what I have now, but it fails with the error: only one SQL statement
allowed.
Sub InsertIntoSQLLite()
Dim cn As SQLiteDb.Connection
Di
18 matches
Mail list logo