Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
> YOu'll have to list the fields explicitly, except for the primary > key. For example, if your table has columns: > > id (PK) > data_1 > data_2 > data_3 > > you should be able to do > > insert into table_name (data_1, data_2, data_3) select > data_1,data_2,data_3 from table_name where id=1

Re: Cloning or duplicating a record

2006-09-14 Thread Steve Edberg
At 3:31 PM -0700 9/14/06, Scott Haneda wrote: > how about: insert into select * from where is the primary key an auto sequence? This is what happens when I try: insert into logbook select * from logbook where id = 1; ERROR 1062: Duplicate entry '1' for key 1 -- -

Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
> how about: > insert into select * from where > > is the primary key an auto sequence? This is what happens when I try: insert into logbook select * from logbook where id = 1; ERROR 1062: Duplicate entry '1' for key 1 -- - Scott Han

Re: Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
> how about: > insert into select * from where > > is the primary key an auto sequence? Yes, pk is on auto increment -- - Scott HanedaTel: 415.898.2602 Novat

Re: Cloning or duplicating a record

2006-09-14 Thread hwigoda
how about: insert into select * from where is the primary key an auto sequence? -Original Message- >From: Scott Haneda <[EMAIL PROTECTED]> >Sent: Sep 14, 2006 5:06 PM >To: MySql >Subject: Cloning or duplicating a record > >Can someone tell me how to take one record and duplicate it

Cloning or duplicating a record

2006-09-14 Thread Scott Haneda
Can someone tell me how to take one record and duplicate it exactly, with the exception of the pk, which I want to increment as usual. I think I need insert select, however, I don't want to name all the fields, as it would break over time, if I add or subtract fields. I seem to recall using a wil

Re: taking MySQL down into "admin" mode

2006-09-14 Thread Wagner, Chris (GEAE, CBTS)
Thanks for that but I was hoping there was a way to do it "live" that didn't require restarting/reloading. Something to do at the mysql> prompt. We had to repair a table and all the backed up connections were threatening to take down the daemon. Mikhail Berman wrote: > > Hi Chris, > > In my.cn

RE: taking MySQL down into "admin" mode

2006-09-14 Thread Mikhail Berman
Hi Chris, In my.cnf in the following section, remove comment from skip-networking statement, and re-start your MySQL # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld mu

taking MySQL down into "admin" mode

2006-09-14 Thread Wagner, Chris (GEAE, CBTS)
Greetz. We have a database that is highly used, around 500 queries/s, and doing administrative tasks can stuff up the database. Is there a way to temporarily prevent client connections from within MySQL? Like unix u can drop the runlevel to do administration, is there something similar in MySQL?

Re: storing URL 2083 characters

2006-09-14 Thread Anders Karlsson
That is up to 64k bytes, not chars, which might not be the same thing if UNICODE is used using utf-8/utf-16 or ucs-2 for example. Although this is usually not an issue in the specific case of an URL. /Karlsson Johan Höök wrote: Hi Peter, I'd thought I'd just mention that the varchar length dep

how to get access to mysql db with in mysql server

2006-09-14 Thread Antoine Solomon
Hello all, I just recieved a mysql server box from another department within my company.. I would like to get the password for the mysql database for mysql.. Is this possible in any other way other then using mysql -u admin -p ? -- Antoine W. Solomon Jr. -- MySQL General Mailing List For list

Re: Like inside in clause

2006-09-14 Thread Brent Baisley
You probably want to look into using RLIKE or REGEXP. SELECT id,name FROM tabename WHERE name RLIKE '^[abc]' - Original Message - From: "Ravi Kumar." <[EMAIL PROTECTED]> To: Sent: Thursday, September 14, 2006 7:37 AM Subject: Like inside in clause Dear Friends, Is there a way to s

Re: Like inside in clause

2006-09-14 Thread Thomas Spahni
On Thu, 14 Sep 2006, Ravi Kumar. wrote: > Is there a way to specify wildcard inside values of an in clause. I want to > be able to do this: > > select id, name from tableName where name in ('a%', 'b%', 'c%'); > > instead of doing > > select id, name from tableName where name like 'a

Re: confirm subscribe to mysql@lists.mysql.com

2006-09-14 Thread linuxmaillists
On Thursday 14 September 2006 09:07, [EMAIL PROTECTED] wrote: > To confirm that you would like > > [EMAIL PROTECTED] > > added to the mysql mailing list, please click on > the following link: > > > http://lists.mysql.com/s/mysql/4509542ae8012255/linuxmaillists=char >ter.net > > This confirmatio

Limiting JOIN queries

2006-09-14 Thread Gareth Adams
I hope this is a simple question. I'm trying to run a select like the one below, but limiting the results to 2 Sub Categories per Category. I can't find a way to do this in the SQL reference mysql> select sub_categories.id, categories.name 'Category', sub_categories.name 'Sub Category' from cate

Like inside in clause

2006-09-14 Thread Ravi Kumar.
Dear Friends, Is there a way to specify wildcard inside values of an in clause. I want to be able to do this: select id, name from tableName where name in ('a%', 'b%', 'c%'); instead of doing select id, name from tableName where name like 'a%' or name like 'b%' or name like 'c%';

Re: South American timber products.

2006-09-14 Thread Duncan Hill
On Thursday 14 September 2006 11:46, Martijn Tonies wrote: > > > for commercial email under bill S.1 6 1 8 Title lll, Section 301, > > lol .. I believe it's not really that ... It CAN be considered SPAM, but > it's just "allowed spam" ... :-D 1618 never passed. http://www.techlawjournal.com/cong

Re: South American timber products.

2006-09-14 Thread Martijn Tonies
> ?!:( A license to SPAM: > > On Sep 12, 2006, at 4:57 AM, Agrapin S.A. - Timber Industry and > Trading wrote: > > > This message is in full compliance with U.S. Federal requirements > > for commercial email under bill S.1618 Title lll, Section 301, > > Paragraph (a)(2)(C) passed by the 1

Re: South American timber products.

2006-09-14 Thread Renato Golin
Paul McCullagh wrote: ?!:( A license to SPAM: On Sep 12, 2006, at 4:57 AM, Agrapin S.A. - Timber Industry and Trading wrote: This message is in full compliance with U.S. Federal requirements for commercial email under bill S.1618 Title lll, Section 301, Paragraph (a)(2)(C) passed by the 105

Re: South American timber products.

2006-09-14 Thread Paul McCullagh
?!:( A license to SPAM: On Sep 12, 2006, at 4:57 AM, Agrapin S.A. - Timber Industry and Trading wrote: This message is in full compliance with U.S. Federal requirements for commercial email under bill S.1618 Title lll, Section 301, Paragraph (a)(2)(C) passed by the 105th U.S. Congress and

Re: South American timber products.

2006-09-14 Thread Renato Golin
Martijn Tonies wrote: This sounds great. Could you please post some of your timber products here to the list? Many of us are really looking for a break from this boring MySQL stuff. Thanks, and our kind regards to you too. Unless they offer a new table-type that allows us to store real timbe

Re: South American timber products.

2006-09-14 Thread Martijn Tonies
> This sounds great. Could you please post some of your timber products > here to the list? Many of us are really looking for a break from this > boring MySQL stuff. Thanks, and our kind regards to you too. Unless they offer a new table-type that allows us to store real timber, I don't think t

Re: How to get size of biggest blob (for max_allowed_packet)?

2006-09-14 Thread Gabriel PREDA
SELECT LENGTH(`CnText`), CHAR_LENGTH(`CnText`), BIT_LENGTH(`CnText`) FROM `Translations` Where: - LENGTH or OCTET_LENGTH - length in bytes - CHAR_LENGTH or CHARACTER_LENGTH - length of the string in characters - BIT_LENGTH - it's LENGTH * 8 You will see a difference betwen LENGTH and CHAR_LENG

How to get size of biggest blob (for max_allowed_packet)?

2006-09-14 Thread Dominik Klein
For adjusting "max allowed packet" value, I need to know the maximum size of my blob fields. How can I get that? Dominik -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]