<div class="gmail_quote">On Thu, Aug 26, 2010 at 12:09 PM, Karl O. Pinc <span dir="ltr">&lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;</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>
&gt; Karl,<br>
&gt;<br>
&gt;     Susan asked that I alter some data-types in a table called<br>
&gt; popbio.gene.<br>
&gt; Basically the majority of the columns contain boolean data, and they<br>
&gt; need to<br>
&gt; be changed to varchar.  I tried before emptying the table, and it<br>
&gt; wouldn&#39;t<br>
&gt; alter. I then dumped the data, emptied the table, and it still won&#39;t<br>
&gt; work.<br>
&gt;  I did empty the default column, which currently reads &#39;false&#39; for<br>
&gt; each of<br>
&gt; these boolean columns.  I Don&#39;t know why it is not letting me alter<br>
&gt; these.<br>
&gt; 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 &#39;alteration failed&#39;  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&#39;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 &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;<br>
Free Software:  &quot;You don&#39;t pay back, you pay forward.&quot;<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>