RE: insert into... select... duplicate key

2005-09-25 Thread Schimmel LCpl Robert B \(GCE 2nd Intel Bn Web Master\)
Actually, both of your solutions worked. Thanks much for the input guys. Rob -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 12:20 AM To: Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) Cc: Danny Stolle; mysql@lists.mysql.com

RE: insert into... select... duplicate key

2005-09-25 Thread Schimmel LCpl Robert B \(GCE 2nd Intel Bn Web Master\)
rds, Danny Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) wrote: > That is the effect that I am looking for, but exactly the method that I > am trying to avoid. If I type the column names into my INSERT... SELECT > and someone later adds a column to the table, I would have to go bac

RE: insert into... select... duplicate key

2005-09-25 Thread Schimmel LCpl Robert B \(GCE 2nd Intel Bn Web Master\)
has autonumbering -> insert into table1 (field2, field3) select (field2, field3) from table1; autonumbering will automatticaly be applied :-) Danny Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) wrote: > Here is the problem that I am having. I am trying to make a copy of a > full

insert into... select... duplicate key

2005-09-24 Thread Schimmel LCpl Robert B \(GCE 2nd Intel Bn Web Master\)
Here is the problem that I am having. I am trying to make a copy of a full record in a table that has a primary key with auto-increment. The real problem is that I want the statement to use SELECT * so that if columns ever get added to the table the statement will still work for the full record. I

Re: Looking for only unique records

2001-03-18 Thread Web master
try distinct(column name) JCampbell wrote: > I want to know if it is possible to build a MySQL query which will only > return the unique values of a specific column. Ie if I had this table: > > id | name |date___ > 1 | Jon | 2001-01-03 > 2 | Bob | 2001-01-04 > 3 | Jon | 2001-01-05 >

Re: Key Word Query

2001-02-27 Thread Web master
I agree, I don't think there is a function in MySql, it will do the job. May be you can use the following algorithm 1. fetch all rows item description. 2. Split into words and put it in a array. 3. Create a counter array of the same limit of word array. 4. in a for loop, count number of time tha

Re: mysql/php

2001-02-14 Thread Web master
or you can try the following code $result=@mysql_db_query($db_name,$query,$link); $num=@mysql_num_rows($result); if($num<=0): echo "No records found"; endif; Martin Cloutier wrote: > Try this: > > $RESULT_SET = mysql_query("SELECT * FROM $table where description LIKE > '%$keyword%'"); > >

Re: How to set the date format to dd/mm/yyyy for all tables in MySql for insertion, selection etc.,

2001-01-26 Thread Web master
Thank paul. I know about Date_format, but was curious if there is some setup parameters would allow us to define the MySql date format . Paul DuBois wrote: > On Fri, Jan 26, 2001 at 01:40:12PM -0700, Web master wrote: > >> Hello, >> >> I would like to change the d

How to set the date format to dd/mm/yyyy for all tables in MySql for insertion, selection etc.,

2001-01-26 Thread Web master
Hello, I would like to change the default date format MySql from /mm/dd to dd/mm/. Does anyone know, how to make this change in MySql? Thanks. - Before posting, please check: http://www.mysql.com/manual.php (the

Re: Joins to one table form two columns

2001-01-23 Thread Web master
select a.id, status1, detail from history a, statusText b where a.id = b.id; rob anderson wrote: > I am new to MySQL so don't laugh! > > > I have a table 2 fields that relate to another table (that stores the > description) > > i.e > > history > id > status1 > status2 > > > statusText > id

Re: jdbc driver

2001-01-23 Thread Web master
Couple of things 1) is the listening port number correct ? 2) If you are using windows, make sure the class path has 8.3 file name format instead of the long file name. other than that it should work fine kerry finn wrote: > Hi, > > What do I use to identify the default jdbc driver for mysql

Re: SELECT FROM TABLE WHERE ?

2001-01-22 Thread Web master
select max(rating) from singlemalts will give you the highest value or select * from singlemalts order by rating desc will give all the rows ordered by rating and the first row will have the highest value Richard Reina wrote: > I've tried the manual (and the Oreily MySQL book) and played arou

newbie question on Driver and java

2001-01-22 Thread Web master
Hello, I am using MySql in my ISP, this is the first time I downladed the big guy himself in my machine. It is working fine as stand alone. My question is , how to use MySql using java programs. I downloaded RESIN1.1 and copied the JAR file to the following directory c:\resin1.1\lib and I adde

Re: I need to migrate MSSql database with relations to MYSql

2001-01-11 Thread Web master
I am trying to do the same thing. The best bet so far is mysqldump. You can find more detail in http://www.sql.com/document and do search on mysqldump Pär Lindhe wrote: > Hello > > I need to migrate the structure of my MSSql database with its relations and > tables to MYSql. Is it possible? And

mysqldump question!

2001-01-10 Thread Web Master
Hello, can any one help me with my following mysqldump question. I want to dump a complete database from one server to another server. I am trying the following comment mysqldump --opt mydatabase | mysql --host=remotehost -C mydatabase when I tried, the remote host is failing with invalid log