Hi,

So as far as I understand, you first create the tables with the wrong
column name ("_PRICE" instead of "PRICE"), and then change the column names
using ALTER TABLE?

What I would probably do is create the table with the correct column names,
as follows:

CREATE TABLE TEST(PRICE INT) AS SELECT * FROM CSVREAD(...)

Or, if you can't do that, first create the table with a temporary name
(TEMP_TEST), and then rename the columns, and as a last step rename the
table.

Regards,
Thomas


On Wed, Oct 23, 2013 at 11:22 AM, Ashley Collins
<[email protected]>wrote:

> Hello,
>
> I'm creating tables using csvread() and then changing the name and type of
> some of the columns.
>
> Columns starting with "_" have the "_" removed and the type changed from
> varchar to numeric(18,9). For example, "_PRICE" is renamed to "PRICE" and
> the column values become numbers.
>
> This is all done within a java.sql.Connection.setAutoCommit(false) and
> java.sql.Connection.commit().
>
> Methods which select from this table from another thread occasionally see
> the unmodified "_PRICE" column.
>
> Setting LOCK_MODE=1 (Serializable) seems to fix the problem, but is that
> just a coincidence? Should it work with LOCK_MODE=3 (Read Committed)?
>
> I'm using version 1.3.170 with JDK 1.7.0_40.
>
> Thanks.
> Ashley
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to