<div class="gmail_quote">On Thu, Aug 26, 2010 at 12:09 PM, Karl O. Pinc <span dir="ltr"><<a href="mailto:kop@meme.com">kop@meme.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 08/26/2010 10:23:26 AM, Lacey Maryott Roerish wrote:<br>
> Karl,<br>
><br>
> Susan asked that I alter some data-types in a table called<br>
> popbio.gene.<br>
> Basically the majority of the columns contain boolean data, and they<br>
> need to<br>
> be changed to varchar. I tried before emptying the table, and it<br>
> wouldn't<br>
> alter. I then dumped the data, emptied the table, and it still won't<br>
> work.<br>
> I did empty the default column, which currently reads 'false' for<br>
> each of<br>
> these boolean columns. I Don't know why it is not letting me alter<br>
> these.<br>
> Is there a way to force it?<br>
<br>
</div>It would help if you gave me an error message.</blockquote><div>The error message just says 'alteration failed' it contains no helpful info :-\. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I suspect the problem is there is no default conversion of<br>
boolean to text. You need to dump the data. Destroy<br>
the table and re-create it, and reload the table.<br>
Be sure to dump as SQL, which means either not using<br>
the -F keyword or using -F p for a plaintext sql dump.<br>
<br>
You could probably figure out a way to create new columns,<br>
and move column-by-column, and then destroy the<br>
old columns -- if you really wanted to.<br></blockquote><div><br></div><div>I'll just recreate the table since I have already emptied it and have the data... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
<br>
Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>><br>
Free Software: "You don't pay back, you pay forward."<br>
-- Robert A. Heinlein<br>
<br>
<br>
_______________________________________________<br>
Babase mailing list<br>
<a href="mailto:Babase@www.eco.princeton.edu">Babase@www.eco.princeton.edu</a><br>
<a href="http://www.eco.princeton.edu/mailman/listinfo/babase" target="_blank">http://www.eco.princeton.edu/mailman/listinfo/babase</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>- -<br>Lacey K. Maryott Roerish<br>Alberts Lab<br>Department of Biology<br>Duke University<br>ph: 919-660-7306<br>fax: 919-660-7293<br><a href="mailto:Lacey.Maryott@duke.edu">Lacey.Maryott@duke.edu</a><br>