INSERT INTO problemtables Col1, Col2, Col3, .#DATE,.#TIME, .vdbold +
 FROM tablecompare  +
 WHERE oldcount <> newcount OR newcount IS NULL


On 19 Jun 2003, at 16:00, Jim Limburg wrote:

> G-Day
> 
> OK, I don't think I'm far off, but I have a table in want to insert into
> values from another table along with some static info..
> 
> Here is the statement I'm using..
> 
>    INSERT INTO problemtables SELECT * FROM tablecompare +
>    WHERE oldcount <> newcount OR newcount IS NULL +
>    UNION SELECT (.#DATE,.#TIME, .vdbold) FROM dummy
> 
> The table is created like this
> CREATE TABLE problemtables (tablename TEXT (18), newcount INTEGER,oldcount +
>    INTEGER, tmstampdt date, tmstamptm time, dbname TEXT (18))
> 
> Dummy is by
> CREATE TABLE dummy (x TEXT (1))
> INSERT INTO dummy x VALUES ('x')
> 
> vdbold is populated..
> 
> I'm figuring the select fills the first three columns, and the union fills
> the rest, but I keep getting the error 2148 - Expression contains extra comma
> 
> What am I doing wrong here?
> Jim Limburg
> 

Reply via email to