I have always used this for de-duplicating...
ALTER IGNORE TABLE mytbl ADD UNIQUE KEY ( myField1, myField1 ) ;
It works a treat, hope it helps
Roger
-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: 20 November 2008 00:35
To: jean claude babin
Cc: mysql@lists.mysq
+
1 row in set (0.00 sec)
mysql> drop table if exists recipes;
Query OK, 0 rows affected, 1 warning (0.00 sec)
*
As you see, the table "recipes" doesn't already exist, and I don't get
an error.
roger.maynard
I am finding that
DROP TABLE IF EXISTS mytable;
Works fine if the table exists - but if it doesn't exist I get an error?
Surely it should not error and just not try to drop the table.
Is it me?
2 | 5 | null
2 | 6 | null
2 | 7 | Reference 7
2 | 8 | null
2 | 9 | null
2 |10 | null
==
Any thoughts
Roger
Yup! That's the kind of thing I was looking for - I just had a complete
blank moment
Thanks!!!
From: Phil [mailto:[EMAIL PROTECTED]
Sent: 12 March 2008 17:05
To: roger.maynard
Cc: mysql@lists.mysql.com
Subject: Re: Auto Fill blank Rows
you could do some
Anyone got any bright ideas of how to solve this one?
I have documents which can contain up to 15 rows of information.
Each row as it is added to the document reference can have any ROW_ID
from 1 to 15 when it is added.
I want to be able to "Auto Fill" the blank rows on a SELECT.
eg
data in
Thanks guys!! << gone to chase some of Dan's coffee >>
Brain gone.. and too many remnants of FoxPro SQL with "INNER JOINS"
Rog
-Original Message-
From: Dan Rogart [mailto:[EMAIL PROTECTED]
Sent: 06 March 2008 13:53
To: Dan Rogart; roger.maynard; mysql list
I got 4 tables:
Table A
| ID | Description1 |
Table B
| ID | Description2 |
Table C
| ID | Description3 |
Table D
| ID | Description4 |
ALL Ids ARE COMMON Values and NONE are MISSING
How can I create
| ID | Description 1 | Description 2 | Description 3
This may take a bit of explaining!
I have a incoming table structure of
PartRef AttribValue
ABC0011 10.00
ABC0012 4
ABC0013 A
ABC0021 12.00
ABC0022 6
ABC002
Take a look at
http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.ht
ml
"CASCADE: Delete or update the row from the parent table and
automatically delete or update the matching rows in the child table.
Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two
tab
Can you just do
SELECT t1.*, "t1" as tablename FROM t1
UNION
SELECT t2.*, "t2" as tablename FROM t2
Roger
-Original Message-
From: Miguel Vaz [mailto:[EMAIL PROTECTED]
Sent: 17 February 2008 00:04
To: mysql@lists.mysql.com
Subject: select with table name
Hi,
I hav
Check out DBConvert variants..
http://www.dbconvert.com/
-Original Message-
From: Sharique uddin Ahmed Farooqui [mailto:[EMAIL PROTECTED]
Sent: 29 January 2008 18:16
To: mysql@lists.mysql.com
Subject: mysql to mysql conversion tool
Hi,
I'm looking an application which let me convert o
else
.
-Original Message-
From: roger.maynard [mailto:[EMAIL PROTECTED]
Sent: 23 January 2008 18:58
To: mysql@lists.mysql.com
Subject: INSERT WHERE NOT EXISTS syntax
Can anyone tell me why this isn't working... v5.0
INSERT INTO master_comments (comment_no,comment
Can anyone tell me why this isn't working... v5.0
INSERT INTO master_comments (comment_no,comment_text,language_id)
SELECT comment_no,comment_text,language_id from mComments
WHERE NOT EXISTS (SELECT comment_no FROM master_comments);
I thought I had it working once but now it isn't?
Ro
Perfect!!
Thanks a million.
-Original Message-
From: Rolando Edwards [mailto:[EMAIL PROTECTED]
Sent: 23 January 2008 15:45
To: roger.maynard; mysql@lists.mysql.com
Subject: RE: Pass Reference to source table in Stored Procedure - How??
What you need is Dynamic SQL via the PREPARE
Hi
Is there any way I can pass the reference to a source table to be used
in a SELECT command within a Stored Procedure
Something like this
CREATE PROCEDURE `myDB`.`sp_test` (myTable varchar(20))
BEGIN
SELECT * FROM myTable;
END $$
This gives error "cannot find Table myDB.myT
16 matches
Mail list logo