Is Load Data Infile or Update is faster?

2005-11-19 Thread mos
I am doing a balance line comparison between the rows of an existing table and a text file that has newer data in it. So I'm comparing the values field by field to the existing rows in the table. If any of the field values are different, I need to update the table with these new values

RE: Triggers that handle multiple events (insert and update)

2005-11-10 Thread Burke, Dan
To: mysql@lists.mysql.com Subject: RE: Triggers that handle multiple events (insert and update) onsdagen den 9 november 2005 18:07 skrev Burke, Dan: > For example, one field has to be >= 0, so I put this validation Why don't you just declare that field as unsigned? Björn Persson -- MySQL

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Björn Persson
onsdagen den 9 november 2005 18:07 skrev Burke, Dan: > For example, one field has to be >= 0, so I put this validation Why don't you just declare that field as unsigned? Björn Persson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.my

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Burke, Dan
I see what you're saying. That won't really help, because I'll still be duplicating changes in the update and insert triggers every time I add a new field. The hope was that I would only need to do it once. Your method sounds like it could become costly from an execution time

Re: Triggers that handle multiple events (insert and update)

2005-11-09 Thread SGreen
yself duplicating trigger code to make an > INSERT and an UPDATE trigger, which makes it harder to maintain in the > long run, especially considering I want to do this for multiple tables. > > I looked through the documentation and couldn't find any example, and > then did some exp

Triggers that handle multiple events (insert and update)

2005-11-09 Thread Burke, Dan
Hello, Can triggers in 5.0 handle multiple events? I have some range checking I'd like to enforce at the database level when inserting or updating a record, and I'm finding myself duplicating trigger code to make an INSERT and an UPDATE trigger, which makes it harder to maintain in th

Re: Possible to use a conditional in this UPDATE

2005-10-31 Thread Michael Stassen
that the manual is currently screwed up, running the two syntaxes together. So far, you have this: UPDATE cart, products SET cart.ship_status = IF(products.ship_status = 1, 'now', 'soon') WHERE products.id = cart.product_id AND cart.session_id = "5511"

Re: Possible to use a conditional in this UPDATE

2005-10-28 Thread Scott Haneda
on 10/28/05 5:52 AM, Brent Baisley at [EMAIL PROTECTED] wrote: > You can nest the IF statement, putting another where 'soon' is like > Jasper suggested. Or you can use the CASE WHEN THEN construct if you > have a lot of conditions you need to check for. Can you show me an example of the CASE meth

Re: Possible to use a conditional in this UPDATE

2005-10-28 Thread Brent Baisley
PROTECTED] wrote: Right now, my update works as follows, and works fine, however, I want to do a condition to say if products.ship_status = 1 then set cart_test.shipping_status to 'now' else set it to 'soon' UPDATE cart_test, products SET cart_test.shipping_statu

Re: Possible to use a conditional in this UPDATE

2005-10-27 Thread Jasper Bryant-Greene
On Thu, 2005-10-27 at 21:22 -0700, Scott Haneda wrote: > on 10/27/05 6:34 PM, Scott Haneda at [EMAIL PROTECTED] wrote: > > > Right now, my update works as follows, and works fine, however, I want to do > > a condition to say if products.ship_status = 1 then set > > cart

Re: Possible to use a conditional in this UPDATE

2005-10-27 Thread Scott Haneda
on 10/27/05 6:34 PM, Scott Haneda at [EMAIL PROTECTED] wrote: > Right now, my update works as follows, and works fine, however, I want to do > a condition to say if products.ship_status = 1 then set > cart_test.shipping_status to 'now' else set it to 'soon' > &g

Possible to use a conditional in this UPDATE

2005-10-27 Thread Scott Haneda
ive db, as much as I want to change the ship_status INTO to an enum, it requires too many changes in application code to do so. I added a field to cart_test called shipping_status, which I want to make a enum field. Right now, my update works as follows, and works fine, however, I want to do a

Re: update row/tbl question...

2005-10-14 Thread Dan Nelson
In the last episode (Oct 14), bruce said: > a basic/new/curious question. i have the following sample tbl schema. > i do the following update on the mysql command line and it updates > for both cases. my question is why??? > > update UserTBL set gid='25', usertype=

update row/tbl question...

2005-10-14 Thread bruce
hi... a basic/new/curious question. i have the following sample tbl schema. i do the following update on the mysql command line and it updates for both cases. my question is why??? it was my understanding that the two cases are different and shouldn't both be triggered.the value of 'us

RE: UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
1:55 PM To: Jeffrey Santos Cc: mysql@lists.mysql.com Subject: RE: UPDATE statement optimization Unless you are on a severely underpowered machine, MySQL will handle 3 million rows without any problems. If you are on such an underpowered machine, then your current process must absolutely

RE: UPDATE statement optimization

2005-10-10 Thread SGreen
ferent lists of numbers, manually scan your decompositions for certain values, delete those certain values (if they exist), reconstitute each list, and update the original record. None of those activities (except for the final UPDATE) can possibly use an index and you always have to do it to E

RE: UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
ctober 10, 2005 1:26 PM To: Jeffrey Santos Cc: mysql@lists.mysql.com Subject: Re: UPDATE statement optimization "Jeffrey Santos" <[EMAIL PROTECTED]> wrote on 10/10/2005 01:07:03 PM: > Hey all! > > > > I'm a very novice MYSQL user of the mentality

Re: UPDATE statement optimization

2005-10-10 Thread SGreen
eir csl vsets in > fcusers. This is a PHP statement but I think you'll get the general idea of > how I'm doing it. Am looking for some suggestions on how to do this more > efficiently: > > > > UPDATE fcusers SET vsets=TRIM(BOTH ',' FROM CONCAT_WS(',

UPDATE statement optimization

2005-10-10 Thread Jeffrey Santos
t table, so I want to be able to remove that entry from all users who have it in their csl vsets in fcusers. This is a PHP statement but I think you'll get the general idea of how I'm doing it. Am looking for some suggestions on how to do this more efficiently: UPDATE fcusers SET vs

Re: HELP - Group_Concat broken after update

2005-09-30 Thread Ed Reed
I meant 600k not 6meg. Sorry >>> "Ed Reed" <[EMAIL PROTECTED]> 9/30/05 9:46:32 AM >>> That's not true. Group_Concat can already return more than 6meg. It's set by group_concat_max_len variable. The fact is that I've been told there are secu

Re: HELP - Group_Concat broken after update

2005-09-30 Thread Ed Reed
That's not true. Group_Concat can already return more than 6meg. It's set by group_concat_max_len variable. The fact is that I've been told there are security issues corrected in the 4.1.14a update and I can't apply them because it will break my already existing ap

Re: How to update libmysqlclient

2005-09-29 Thread Joerg Bruehe
Hi Thomas, all! thomas Armstrong wrote: Hi. Working on Linux Fedora Core 2. I'm programming an application which requires version 14 of the MySQL Client libraries. Now I've got version 10: --- [[...]] /usr/src/mysql-3.23.58/libmysql/.libs/libmysqlclient.so.10 /usr/src/mysql-3.23.58

How to update libmysqlclient

2005-09-28 Thread thomas Armstrong
Hi. Working on Linux Fedora Core 2. I'm programming an application which requires version 14 of the MySQL Client libraries. Now I've got version 10: --- [EMAIL PROTECTED] mysql_config --libs -L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm [EMAIL PROTECTED] locate mysqlclient /

Re: HELP - Group_Concat broken after update

2005-09-27 Thread Dan Nelson
In the last episode (Sep 27), Ed Reed said: > Will someone please respond to this? > > >>> "Ed Reed" <[EMAIL PROTECTED]> 9/22/05 1:30 PM >>> > Bump! > > >>> "Ed Reed" < [EMAIL PROTECTED] > 9/21/05 2:09:58 PM >>> > > I just upgraded from 4.1.11 to 4.1.14a and now Group_Concat returns > garbage. In

Re: HELP - Group_Concat broken after update

2005-09-27 Thread Ed Reed
Will someone please respond to this? - Ed >>> "Ed Reed" <[EMAIL PROTECTED]> 9/22/05 1:30 PM >>> Bump! >>> "Ed Reed" < [EMAIL PROTECTED] > 9/21/05 2:09:58 PM >>> I just upgraded from 4.1.11 to 4.1.14a and now Group_Concat returns garbage. In the previous version Group_Concat returned a text str

Re: HELP - Group_Concat broken after update

2005-09-22 Thread Ed Reed
Bump! >>> "Ed Reed" <[EMAIL PROTECTED]> 9/21/05 2:09:58 PM >>> I just upgraded from 4.1.11 to 4.1.14a and now Group_Concat returns garbage. In the previous version Group_Concat returned a text string and after the upgrade they are returning a blob.

HELP - Group_Concat broken after update

2005-09-21 Thread Ed Reed
I just upgraded from 4.1.11 to 4.1.14a and now Group_Concat returns garbage. In the previous version Group_Concat returned a text string and after the upgrade they are returning a blob.

Re: Error in Update Command Text - What am I missing

2005-09-20 Thread Arno Coetzee
Blue Wave Software wrote: I'm getting an error from the following SQL Syntax. Can anyone guide me on what I am missing. It's probably obvious but I can't see it I have even resorted to rereading the section on the update command. The CustID Field is the unique Identifier and pri

Error in Update Command Text - What am I missing

2005-09-20 Thread Blue Wave Software
I'm getting an error from the following SQL Syntax. Can anyone guide me on what I am missing. It's probably obvious but I can't see it I have even resorted to rereading the section on the update command. The CustID Field is the unique Identifier and primary key of the table. The U

Re: Unclear on UPDATE versus INSERT, and a simple query that is not working

2005-09-15 Thread Dave
UPDATE forums_members,members SET forums_members.active=members.active WHERE forums_members.member_id = members.id Oh, I see. I now feel a little foolish as I should have grasped that. For some reason I assumed that by specifying where to get the data from, it would be assumed that's

Re: Unclear on UPDATE versus INSERT, and a simple query that is not working

2005-09-15 Thread Pooly
is identical, so I simply > want to copy the fields from the old table to the new, overwriting what > may exist in the new. I want to match the fields by using the member ID, > called "id" in the old table and "MEMBER_ID" in the new. > > This is the s

Unclear on UPDATE versus INSERT, and a simple query that is not working

2005-09-15 Thread Dave
n the new. I want to match the fields by using the member ID, called "id" in the old table and "MEMBER_ID" in the new. This is the statement I thought would work. UPDATE forum_members( active ) SELECT active FROM members WHERE forum_members.MEMBER_ID = members.id But MyS

Re: Last Update

2005-09-14 Thread SGreen
Schalk <[EMAIL PROTECTED]> wrote on 09/14/2005 09:31:23 AM: > Greetings > > Is there a way to get the last update date for an entire table not just > a single row? More specifically, is there a way to do this with Java? > > -- > Kind Regar

Last Update

2005-09-14 Thread Schalk
Greetings Is there a way to get the last update date for an entire table not just a single row? More specifically, is there a way to do this with Java? -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- MySQL General Mailing

select (sendind data)/update (locked)/select (locked) ??

2005-09-14 Thread sutha kar
queries locked in the following fashion: 1. SELECT on table OHMYGOD - "Sending data" state 2. UPDATE on the same table OHMYGOD - "Locked" state 3. SELECT on table OHMYGOD - "Locked" state and subsequently all the other SELECT queries on OHMYGOD table were loc

Re: Delayed UPDATE execution?

2005-09-09 Thread Subscriptions
Okay, I asked the web host guys and this is what they said: "Hi Jenifer, we only use single instances of MySQL so the master/slave replication issue would not be possible. As far as I know, the only way a delayed update could occur would be if you had multiple updates queued behind a

Re: Delayed UPDATE execution?

2005-09-09 Thread Gleb Paharenko
Hello. >So now my question... is it possible that MySQL didn't execute that first >UPDATE query on >that first page until after the rest of the process completed? >... >- Every page has UPDATEs, INSERTs, or DELETE commands so I'

Re: Delayed UPDATE execution?

2005-09-08 Thread Subscriptions
hmmm... let me ask the guys how they have it all set up. Jenifer - Original Message - How is your MySQL installation set up? At my company, we have a master server and several slaves replicating off that master. All inserts/updates go to the master, and all selects go to the slave

Re: Delayed UPDATE execution?

2005-09-08 Thread Scott Noyes
> So now my question... is it possible that MySQL didn't execute that first > UPDATE query on that first page until after the rest of the process completed? > > - The customer page is a basic form that posts the information to itself > with a simple UPDATE command and t

Delayed UPDATE execution?

2005-09-08 Thread Subscriptions
after the order was entered to change the account. So now my question... is it possible that MySQL didn't execute that first UPDATE query on that first page until after the rest of the process completed? - The customer page is a basic form that posts the information to itself with

Re: Index update process 20+ hrs

2005-09-01 Thread matt_lists
It does not seem fine to me, mysql seems to really get slow once you break about the 3 gig myd size, or 1.5 gig myi size not sure why, I've changed every setting, but nothing seems to help Matt Clyde Lewis wrote: Matt, Looking at how the database if currently configured, do you have any su

Re: Index update process 20+ hrs

2005-08-29 Thread Jeff Smelser
On Monday 29 August 2005 04:55 pm, Alexey Polyakov wrote: > I'd try setting > innodb_buffer_pool_size=8G > in my.cnf Then it will run out of memory. You only get 2gig for bufferpools no matter how much more you have. -- === Jab

Re: Index update process 20+ hrs

2005-08-29 Thread Alexey Polyakov
I'd try setting innodb_buffer_pool_size=8G in my.cnf -- Alexey Polyakov

Re: Index update process 20+ hrs

2005-08-29 Thread Brent Baisley
: Guys, I have a huge table to which I'm attempting to update the foreign key and index. It is taking me more than 20 hrs to complete the process and would like to know if someone can point me in the right direction. Please let me know of any additional information that I should pr

Re: Index update process 20+ hrs

2005-08-29 Thread matt_lists
Get used to it, I've got similar tables, mine have less columns, but more records, my biggest takes a week to restore a mysqldump Matt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Index update process 20+ hrs

2005-08-29 Thread Clyde Lewis
, `prtDoNotReturn` enum('N','Y') NOT NULL default 'N', `prtSalesHistTot` int(10) NOT NULL default '0', `prtSalesHistPrd` smallint(5) NOT NULL default '0', PRIMARY KEY (`prtPNID`), UNIQUE KEY `prtUPN` (`prtPN`,`prtStore`,`prtMfg`), KEY `prtSort` (`prtSort`), KEY `sku1` (`prtSKU`,`prtStore`), KEY `prtIPN` (`prtStripped`,`prtStore`,`prtMfg`), KEY `prtDESC` (`prtDesc`,`prtStore`), KEY `prtWrtyTypeID` (`prtWrtyTypeID`), KEY `prtStore` (`prtStore`,`prtMfg`), CONSTRAINT `parts_f1` FOREIGN KEY (`prtStore`) REFERENCES `c

Re: Index update process 20+ hrs

2005-08-29 Thread SGreen
Clyde Lewis <[EMAIL PROTECTED]> wrote on 08/29/2005 01:47:11 PM: > Guys, > > I have a huge table to which I'm attempting to update the foreign key > and index. It is taking me more than 20 hrs to complete the process and > would like to know if someone can point

Index update process 20+ hrs

2005-08-29 Thread Clyde Lewis
Guys, I have a huge table to which I'm attempting to update the foreign key and index. It is taking me more than 20 hrs to complete the process and would like to know if someone can point me in the right direction. Please let me know of any additional information that I should pr

help please with SQL UPDATE

2005-08-24 Thread Angela
(`record`) ); Phonebin is being populated by web users submitting phone numbers for 'Airport Terminal Information Service' - ATIS, Air Traffic Control, ATC etc. (if you are interested the web submission page is http://activitae.com/airbase/phonebin.htm ) A single web contributor may n

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-10 Thread Brendan Gogarty
re* allowed to use JOINED tables as the "thing to be > updated". [snip] Michael wrote: [snip] > From the manual page Shawn cites: "Starting with MySQL 4.0.4, you can also > perform UPDATE operations that cover multiple tables." So, yes, it's a > versio

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Gordon Bruce
Multi Table UPDATES are first supported in 4.0.x -Original Message- From: Brendan Gogarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 12:16 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: RE: JOIN QUERY -> UPDATE ... help?! "Brendan Gogarty" <

Re: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Michael Stassen
tables as the "thing to be updated". Which means that an UPDATE statement can look VERY MUCH like a SELECT statement turned on it's head. In your case, I think you are trying to figure out how to flip this: Brendan Gogarty wrote: Hi Shaun, I'm afraid after a few hours of

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Brendan Gogarty
ised with this version of mysql and I am banging my head against a > wall. Please Help! > ok first query. [snip] > any ideas? > > Start from here: http://dev.mysql.com/doc/mysql/en/update.html Updates *are* allowed to use JOINED tables as the "thing to be updated".

Re: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread SGreen
s.page_ID > LEFT JOIN links_DB_bk > ON page_elements.link_ID=links_DB_bk.link_ID > WHERE content_type='text'" > - > > Now I want to update table 3 (links_DB) using > page_elements.link_ID=links_DB.link_ID > > usual

JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Brendan Gogarty
Now I want to update table 3 (links_DB) using page_elements.link_ID=links_DB.link_ID usual update query doesn't seem to work in this circumstance .. any ideas?

Re: Update delay

2005-08-09 Thread Gleb Paharenko
Hello. If you send your configuration file there might be much more suggestions. In my opinion SET AUTOCOMMIT=0 before update should improve performance (don't forget to COMMIT after transaction). If you're sure in your data you can SET FOREING_KEY_CHECK=0 and SET UNIQUE_CHE

Re: query - select from one, update another

2005-08-08 Thread Michael Stassen
Jasper Bryant-Greene wrote: Michael Stassen wrote: Not exactly. They aren't the same. COUNT(id) counts distinct values of id, while COUNT(*) simply counts rows. [snip] Actually, COUNT(id) counts non-NULL values of id. COUNT(DISTINCT id) would count distinct values. http://dev.mysql.com

Re: query - select from one, update another

2005-08-08 Thread Jasper Bryant-Greene
Michael Stassen wrote: Not exactly. They aren't the same. COUNT(id) counts distinct values of id, while COUNT(*) simply counts rows. [snip] Actually, COUNT(id) counts non-NULL values of id. COUNT(DISTINCT id) would count distinct values. http://dev.mysql.com/doc/mysql/en/group-by-functi

Re: query - select from one, update another

2005-08-08 Thread Michael Stassen
Sebastian wrote: Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Hi. i came up with a similar query last night, but i didnt use group by. I have question, is it better to use COUNT

Re: query - select from one, update another

2005-08-08 Thread SGreen
> >>> > >>> > >>>> Gleb Paharenko wrote: > >>>> > >>>> > >>>>> Hello. > >>>>> > >>>>> > >>>>> > >>>>> Wh

Re: query - select from one, update another

2005-08-08 Thread Nuno Pereira
Sebastian wrote: Nuno Pereira wrote: [EMAIL PROTECTED] wrote: Sebastian <[EMAIL PROTECTED]> wrote on 08/08/2005 10:53:55 AM: Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY

Update delay

2005-08-08 Thread javabuddy
On an InnoDB table for 70k records the update action is taking so much time.(More than 30minutes). We got the innodb_buffer_pool_size as 4gigs. IS there anything more to add up to get the processes kick its speed. - javabuddy

Re: query - select from one, update another

2005-08-08 Thread SGreen
arenko wrote: > >>> > >>> > >>>> Hello. > >>>> > >>>> > >>>> > >>>> What about this: > >>>> > >>>> > >>>> > >>>> UPDATE news > >&g

Re: query - select from one, update another

2005-08-08 Thread Sebastian
Nuno Pereira wrote: [EMAIL PROTECTED] wrote: Sebastian <[EMAIL PROTECTED]> wrote on 08/08/2005 10:53:55 AM: Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Hi. i c

Re: query - select from one, update another

2005-08-08 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: Sebastian <[EMAIL PROTECTED]> wrote on 08/08/2005 10:53:55 AM: Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Hi. i came up with a s

Re: query - select from one, update another

2005-08-08 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: Sebastian <[EMAIL PROTECTED]> wrote on 08/08/2005 10:53:55 AM: Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Hi. i came up with a s

Re: query - select from one, update another

2005-08-08 Thread SGreen
Sebastian <[EMAIL PROTECTED]> wrote on 08/08/2005 10:53:55 AM: > Gleb Paharenko wrote: > > >Hello. > > > > > > > >What about this: > > > > > > > >UPDATE news > > > >SET comments = > > > >( > > >

Re: query - select from one, update another

2005-08-08 Thread Sebastian
Gleb Paharenko wrote: Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Hi. i came up with a similar query last night, but i didnt use group by. I have question, it it better to use

RE: UPDATE WITH row

2005-08-08 Thread Edwin Cruz
I think this should work: Update int_contxtd_details a, int.contxtd_details b Set a.params = b.params Where B.id=25 And a.id!=25 This will work in a php script where we cannot use more than one sql at the same time or also will work y a front end manager -Original Message- From: Nuno

Re: query - select from one, update another

2005-08-08 Thread Gleb Paharenko
Hello. No, it isn't. Here is the test case: create table comments(id int auto_increment,newsid int,primary key(id)); create table news(id int,comments int); insert into news(id) values('1'),(2),(3),(4),(5); insert into comments(newsid) values(1),(1),(2),(4),(4),(4);

Re: query - select from one, update another

2005-08-08 Thread Enrique Sanchez Vela
--- Gleb Paharenko <[EMAIL PROTECTED]> wrote: > Hello. > > What about this: > > UPDATE news > SET comments = > ( > SELECT COUNT(id) > FROM comments > WHERE newsid = news.id > GROUP BY newsid > ); > > Isn't

Re: query - select from one, update another

2005-08-08 Thread Gleb Paharenko
Hello. What about this: UPDATE news SET comments = ( SELECT COUNT(id) FROM comments WHERE newsid = news.id GROUP BY newsid ); Sebastian <[EMAIL PROTECTED]> wrote: > I have two tables: news and comments. > > i want to count the num

query - select from one, update another

2005-08-07 Thread Sebastian
I have two tables: news and comments. i want to count the number of comments for each newsid and update the count in news.comment comments.newsid belongs to news.id can i do this with sub queries? im using v4.1.x i have many records in the comments table so im not sure what the most

Re: UPDATE WITH row

2005-08-05 Thread Nuno Pereira
[EMAIL PROTECTED] wrote: Nuno Pereira <[EMAIL PROTECTED]> wrote on 08/05/2005 02:41:45 PM: Following the "SELECT DISTINCT" topic, I have another question. I tryed to UPDATE all the tables, replacing one column in every tables with the contents of one specific row. I tri

Re: UPDATE WITH row

2005-08-05 Thread SGreen
Nuno Pereira <[EMAIL PROTECTED]> wrote on 08/05/2005 02:41:45 PM: > Following the "SELECT DISTINCT" topic, I have another question. > > I tryed to UPDATE all the tables, replacing one column in every tables > with the contents of one specific row. I tried this, bu

UPDATE WITH row

2005-08-05 Thread Nuno Pereira
Following the "SELECT DISTINCT" topic, I have another question. I tryed to UPDATE all the tables, replacing one column in every tables with the contents of one specific row. I tried this, but the syntax is incorrect: UPDATE int_contxtd_details SET params=(SELECT p

Re: Persistent Corruption [UPDATE]

2005-08-04 Thread Chris McKeever
thanks for everyone help/suggestions -- I wound up swapping the media, and what was corrupt prior, seems to be all nice and happy now -- so - as suggested, looks to be that the drive was starting to fault On 7/31/05, Chris McKeever <[EMAIL PROTECTED]> wrote: > Thanks for all the help - I tried th

RE: increment and update in one query

2005-08-03 Thread Christian Lee
unt+1,0) as count >>from banners b >>inner join domains on b.did=domains.id >>where domains.domain like 'domain.com'; >> >> I think this query is pretty simple, and I want to do following: >>select ifnull(domains.id,0) as id, >>

Re: increment and update in one query

2005-08-03 Thread SGreen
banners b >inner join domains on b.did=domains.id >where domains.domain like 'domain.com'; > > I think this query is pretty simple, and I want to do following: >select ifnull(domains.id,0) as id, > ifnull(domains.domain,'no such domain') a

increment and update in one query

2005-08-03 Thread Christian Lee
s.domain,'no such domain') as domain, /// here I want to get the b.count already incremented (+1) /// and update my column b.count with new value in one query. /// for example: /// if(b.count,(update b set count:=count + 1),0) as count from banne

Re: SELECT by LEFT(col,1)="{letter}" ?? improvements and sarge update to 4.1

2005-07-30 Thread Gleb Paharenko
Hello. I'm unable to give you suggestions, because I don't see the whole picture of your data structure. Please, next time forward your messages to the list. Chances to receive a good advice are greater. Send good model of your databases (use 'SHOW CREATE TABLE' to represent your tables).

Re: SELECT by LEFT(col,1)="{letter}" ?? improvements and sarge update to 4.1

2005-07-28 Thread Gleb Paharenko
hink colnames should get > a fulltext-field but how would it beccorect? Just one letter > or do the whole field. > colnames type = text (varchar might be ok with 255 chars). > > What would you suggest? > > == > the other thing is that I would like to updat

Re: SELECT by LEFT(col,1)="{letter}" ?? improvements and sarge update to 4.1

2005-07-28 Thread Philippe Poelvoorde
Hi, you should have posted 2 threads ;) the other thing is that I would like to update to 4.1.x on my debian sarge. Has anybody done this yet? do I have to just: apg-get remove mysql ? and apg-get install mysql-4.1 just "apt-get install mysql-4.1" to get things runs smoothly (w

SELECT by LEFT(col,1)="{letter}" ?? improvements and sarge update to 4.1

2005-07-28 Thread M.E. Koch
ld like to update to 4.1.x on my debian sarge. Has anybody done this yet? do I have to just: apg-get remove mysql ? and apg-get install mysql-4.1 wich packages are needed.. will there be much mor performance? Bon Vibes and Thank you mathias -- MySQL General Mailing List For list arch

Re: Update Debian 2.0 (mysql 3.21 to 3.22)

2005-07-27 Thread Gleb Paharenko
tion and for > continue use ISAM format in the future and with a more modern linux > distribution I want to use 4.1 or wait for 5.0. > >> -Mensaje original- >> De: Gleb Paharenko [mailto:[EMAIL PROTECTED] >> Enviado el: jueves, 21 de julio de

RE: Update Debian 2.0 (mysql 3.21 to 3.22)

2005-07-22 Thread iagosineiro
. > -Mensaje original- > De: Gleb Paharenko [mailto:[EMAIL PROTECTED] > Enviado el: jueves, 21 de julio de 2005 14:59 > Para: mysql@lists.mysql.com > Asunto: Re: Update Debian 2.0 (mysql 3.21 to 3.22) > > > Hello. > > For me it is hard to say what's wrong

Re: Update Debian 2.0 (mysql 3.21 to 3.22)

2005-07-21 Thread Gleb Paharenko
> I need to update a debian 2.0 linux box with mysql 3.21.31 to some of the > last version of mysql 3.22. > > I tried to use the binaries from www.mysql.com (3.22.32), but when I launch > mysql services with the script mysql.server in the log appeared: > > mysqld star

Update Debian 2.0 (mysql 3.21 to 3.22)

2005-07-21 Thread iagosineiro
Hi. I need to update a debian 2.0 linux box with mysql 3.21.31 to some of the last version of mysql 3.22. I tried to use the binaries from www.mysql.com (3.22.32), but when I launch mysql services with the script mysql.server in the log appeared: mysqld started on Thu Jul 21 10:25:56 CEST

Re: Conditional insert or update.

2005-07-20 Thread Paul Halliday
t was available for update. It would see that that the ip exists (primary key) which would mean that mac_current already exists so update mac_new. Or something like that.. :) mysql> INSERT INTO table (a,b,c) VALUES (1,2,3) -> ON DUPLICATE KEY UPDATE c=c+1; On 7/20/05, Gleb Pahare

Re: Conditional insert or update.

2005-07-20 Thread Gleb Paharenko
Hello. Please, provide more information on your's application logic. To catch events which occurs for the table use triggers. See: http://dev.mysql.com/doc/mysql/en/triggers.html Unfortunately they're available only in MySQL 5.0.x, which is still beta. Paul Halliday <[EMAIL PROTEC

Conditional insert or update.

2005-07-20 Thread Paul Halliday
Hi, I have a table that looks something like this: ip | mac_current | mac_change now if I have an entry that looks like this 10.0.0.1 | 11:11:11:11:11:11:11 | NULL If the next time the script runs and the mac has changed, how can I catch this and put the new MAC into mac_change? Ultimately,

Re: how to update a mysql table from access

2005-07-14 Thread nephish
wow thanks ! this i can do. was just downloading python for windows, will still keep it, may be usefull one day, but i would lot rather update via access. thanks again. nephish <>< On Thu, 2005-07-14 at 09:18 -0400, [EMAIL PROTECTED] wrote: > If you have your native, auto-updated

Re: how to update a mysql table from access

2005-07-14 Thread SGreen
If you have your native, auto-updated table in MS Access and a different Linked table pointing to the MySQL copy of it in the same database, just build an Access query that will INSERT or UPDATE (as appropriate) your linked table with data from your native table. No scripting required, just

Re: how to update a mysql table from access

2005-07-14 Thread nephish
Hey thanks for the link, yep, i guess i am going to have to write something up in python. (or maybe be lucky enough to find something i can modify from hotscripts :) . i may check out that piece called Navicat. saw some reviews of it and it may have what i need also. thanks again nephish <>< On

Re: how to update a mysql table from access

2005-07-13 Thread mos
At 09:32 PM 7/13/2005, you wrote: you mean like in a script? the windows computer runs access, which i am not very familiar with and was able to accomplish what i have done so far by lots o' docs at the mysql.com site. sorry for the newbie-ness of this question. i am somewhat familliar with pyth

Re: how to update a mysql table from access

2005-07-13 Thread nephish
c the two databases together every oh,,, 5 minutes or so. > >there is lots of documentation on how to do this by linking a table to a > >mysql table, however, when i do this, the access table is the one that > >gets updated, not the mysql table (deletes any info received since la

Re: how to update a mysql table from access

2005-07-13 Thread mos
, when i do this, the access table is the one that gets updated, not the mysql table (deletes any info received since last update) and still does not provide a way to do this automatically. I cant find way to do it anywhere, little or no docs.. or i am looking in the wrong place. thanks for reading

how to update a mysql table from access

2005-07-13 Thread nephish
is the one that gets updated, not the mysql table (deletes any info received since last update) and still does not provide a way to do this automatically. I cant find way to do it anywhere, little or no docs.. or i am looking in the wrong place. thanks for reading this, hope someone can help

Update not returning any warning on failure

2005-07-05 Thread Sujay Koduri
= ; UPDATE EMP SET STYLE='' WHERE ID='999'; IF b = THEN INSERT INTO EMP (ID) VALUES ('999'); END IF; COMMIT; END; The problem here is that even if update fails, meaning even if ID '999' doesn't exist, MySQL d

Update query to set random data

2005-07-01 Thread zzapper
Hi, In order to generate some useful test data eg randomnly setting the flag select_normal to 0 or 1 use the following update tbl_products set select_normal=round(rand()); I've actually answered my own question (as usual in formulating the question you often can workout the answer) But a

<    2   3   4   5   6   7   8   9   10   11   >