RE: SQL Statement Help

2005-12-14 Thread Charles Walmsley
. With best wishes Ch -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 14 December 2005 19:22 To: Jesse Cc: mysql@lists.mysql.com Subject: Re: SQL Statement Help Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM: Hello, I need

Re: SQL Statement Help

2005-12-14 Thread Martijn Tonies
Hello, I need help building a SQL Statement. I'm currently using MySQL 5.something. This one is kind of strange, and I can't seem to figure out how to do it. I have a table named Participants. Each Participant is allowed to bring up to 5 Guests. Instead of putting the names in a

Re: SQL Statement Help

2005-12-14 Thread SGreen
Jesse [EMAIL PROTECTED] wrote on 12/14/2005 02:03:22 PM: Hello, I need help building a SQL Statement. I'm currently using MySQL 5.something. This one is kind of strange, and I can't seem to figure out how to do it. I have a table named Participants. Each Participant is allowed to

Re: SQL statement help

2005-10-17 Thread Terence
Turn off your auto commit (if using innodb) and run the queries. See how many rows it updates and compare them. If it matches commit it. Else rollback. C.F. Scheidecker Antunes wrote: Another thing is that table2 might not have a match. C.F. Scheidecker Antunes wrote: I actually forgot

Re: SQL statement help

2005-10-17 Thread SGreen
C.F. Scheidecker Antunes [EMAIL PROTECTED] wrote on 10/16/2005 01:58:56 PM: I actually forgot something. I need a two statements into one. The reason is that table_two has multiple values, so I need the minimal ID from table 2.Thanks. Maybe I am working too much here and tired to see the

RE: SQL statement help

2005-10-16 Thread J.R. Bullington
I am not the smartest on the list, but I think this would do it for you. UPDATE table_one t1, table_two t2 SET t1.ID = t2.ID WHERE t2.num = t1.num AND t1.ID = 0 J.R. -Original Message- From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] Sent: Sunday, October 16, 2005 1:45 PM To:

Re: SQL statement help

2005-10-16 Thread C.F. Scheidecker Antunes
I actually forgot something. I need a two statements into one. The reason is that table_two has multiple values, so I need the minimal ID from table 2.Thanks. Maybe I am working too much here and tired to see the right statement. J.R. Bullington wrote: I am not the smartest on the list, but

Re: SQL statement help

2005-10-16 Thread C.F. Scheidecker Antunes
Another thing is that table2 might not have a match. C.F. Scheidecker Antunes wrote: I actually forgot something. I need a two statements into one. The reason is that table_two has multiple values, so I need the minimal ID from table 2.Thanks. Maybe I am working too much here and tired to

Re: SQL Statement Help - Is this possible?

2003-12-11 Thread spamtrap
Mark, You can find your first missing date in MySQL 4.1.0(alpha) or higher, using sub-selects, something like this: SELECT MIN(DATEADD(LOAD_DATE,1)) AS MISSING_DATE FROM load_cntl AS A WHERE DATEDIFF(NOW(), LOAD_DATE) 30 AND LOAD_DATE (SELECT MAX(LOAD_DATE) FROM load_cntl AS B) AND