On Wed, 26 Mar 2008 18:03:06 -0500,
Seb <[EMAIL PROTECTED]> wrote:
> On Wed, 26 Mar 2008 22:46:08 +,
> Sam Mason <[EMAIL PROTECTED]> wrote:
[...]
>> You could turn the problem around and make the bool columns into ints
>> (which should be a simple search-and-replace, I hope) and then write
>
On Thu, Mar 27, 2008 at 12:40 AM, Martijn van Oosterhout <[EMAIL PROTECTED]>
wrote:
> Don't think anyone mentioned it, but if you could get it to output
> quotes around the value, like:
>
> INSERT INTO my_table (var_bool) VALUES ('0');
>
> It will also work.
>
This is good to know. There is an o
On Wed, Mar 26, 2008 at 05:28:18PM -0500, Seb wrote:
> > INSERT INTO my_table (var_bool) VALUES ( CAST( 0 AS BOOLEAN )); or
> > INSERT INTO my_table (var_bool) VALUES (0::BOOLEAN);
>
> Thanks Richard. Is there a way to do it without changing the INSERT
> command? As I mentioned, there are many m
On Wed, 26 Mar 2008 22:46:08 +,
Sam Mason <[EMAIL PROTECTED]> wrote:
[...]
> You could turn the problem around and make the bool columns into ints
> (which should be a simple search-and-replace, I hope) and then write
> something (again hopefully simple) to turn them all back into bools.
> I.
"Adam Rich" <[EMAIL PROTECTED]> writes:
>> Thanks Richard. Is there a way to do it without changing the INSERT
>> command? As I mentioned, there are many more columns of different
>> types, so finding and replacing the VALUES would be very difficult.
> Can you import the data into a holding tabl
On Wed, Mar 26, 2008 at 3:28 PM, Seb <[EMAIL PROTECTED]> wrote:
> On Wed, 26 Mar 2008 15:11:47 -0700,
> "Richard Broersma" <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> > INSERT INTO my_table (var_bool) VALUES ( CAST( 0 AS BOOLEAN )); or
> > INSERT INTO my_table (var_bool) VALUES (0::BOOLEAN);
>
>
> Th
On Wed, 26 Mar 2008 17:34:59 -0500,
"Adam Rich" <[EMAIL PROTECTED]> wrote:
[...]
> Can you import the data into a holding table (with columns defined as
> integer) first, and then use a SQL statement to insert from there into
> the final destination table (casting in the process) ?
Yes, that wou
On Wed, Mar 26, 2008 at 05:28:18PM -0500, Seb wrote:
> On Wed, 26 Mar 2008 15:11:47 -0700,
> "Richard Broersma" <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> > INSERT INTO my_table (var_bool) VALUES ( CAST( 0 AS BOOLEAN )); or
> > INSERT INTO my_table (var_bool) VALUES (0::BOOLEAN);
>
>
> Thanks Ric
> Thanks Richard. Is there a way to do it without changing the INSERT
> command? As I mentioned, there are many more columns of different
> types, so finding and replacing the VALUES would be very difficult.
Can you import the data into a holding table (with columns defined
as integer) first, an
On Wed, 26 Mar 2008 15:11:47 -0700,
"Richard Broersma" <[EMAIL PROTECTED]> wrote:
[...]
> INSERT INTO my_table (var_bool) VALUES ( CAST( 0 AS BOOLEAN )); or
> INSERT INTO my_table (var_bool) VALUES (0::BOOLEAN);
Thanks Richard. Is there a way to do it without changing the INSERT
command? As I
On Wed, Mar 26, 2008 at 2:58 PM, Seb <[EMAIL PROTECTED]> wrote:
> INSERT INTO my_table (var_bool) VALUES (0);
> INSERT INTO my_table (var_bool) VALUES (1);
>
> So this results in an error. Unfortunately, there are many more columns
> and it would be very difficult to write a regexp to replace the
Hi,
I'm running into a problem importing some MS Access tables into
PostgreSQL using mdbtools. The schema is exported effectively with
mdb-schema, but several tables have boolean columns. To deal with some
embedded double quotes in text fields, I'm exporting the tables as
INSERT commands using m
12 matches
Mail list logo