Thank you for your response and the info.
Actually I was using 4.0.1 which I downloaded a couple of days ago:
[beckymcelroy@indigo bhm]$ rpm -qa | grep SQL
MySQL-Max-4.0.1-2
MySQL-client-4.0.1-2
MySQL-4.0.1-2
[beckymcelroy@indigo bhm]$
Here's what I did:
mysql>
mysql> select * from cnam1;
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| number | cname | carrier_id | privacy | last_mod_date |
last_mod_id | last_app_date | last_app_id | version | assigned_scps |
status |
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| 4077711313 | SeanWheeler | 90 | 2 | 20011227114313
| 500 | 00000000000000 | -1 | 2 | 3
| 1 |
| 9197722221 | berry | 90 | 3 | 20020102114127
| 500 | 20020102114532 | 501 | 4 | 10
| 0 |
| 650 | San Francisco | 0 | 0 | 20011227111336
| 342 | 00000000000000 | -1 | 1 | 24
| 1 |
| 302467 | Sue's Subshop | 90 | 3 | 20020109113241
| 500 | 20020102115111 | 501 | 7 | 24
| 0 |
| 6014911113 | SudzCarwash | 520 | 1 | 20020102115234
| 500 | 20020102115259 | 501 | 33 | 32768
| 0 |
| 333 | tubs | 99 | 2 | 20020109113440
| 501 | 20020109113440 | 500 | 3 | 10
| 0 |
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
6 rows in set (0.00 sec)
mysql> select * from cnam2;
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| number | cname | carrier_id | privacy | last_mod_date |
last_mod_id | last_app_date | last_app_id | version | assigned_scps |
status |
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| 4077711313 | SeanWheeler | 0 | 2 | 20020109113108
| 500 | 00000000000000 | -1 | 2 | 3
| 1 |
| 9197722221 | berry | 90 | 3 | 20020102114127
| 500 | 20020102114532 | 501 | 4 | 10
| 0 |
| 650 | San Francisco | 90 | 0 | 20020109113158
| 342 | 00000000000000 | -1 | 1 | 24
| 1 |
| 333 | tubs | 99 | 2 | 20020109113453
| 501 | 20020109113453 | 500 | 3 | 10
| 0 |
+------------+---------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
4 rows in set (0.00 sec)
mysql>
mysql> delete cnam1, cnam2 from cnam1 left join cnam2 on
cnam1.number=cnam2.number where
-> (cnam1.carrier_id=90 and cnam1.number=cnam2.number) or
(cnam2.carrier_id=90 and cnam1.number=cnam2.number) or
(cnam1.carrier_id=90 and cnam2.number is null);
Query OK, 7 rows affected (0.03 sec)
mysql> select * from cnam1;
+------------+-------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| number | cname | carrier_id | privacy | last_mod_date |
last_mod_id | last_app_date | last_app_id | version | assigned_scps |
status |
+------------+-------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| 6014911113 | SudzCarwash | 520 | 1 | 20020102115234
| 500 | 20020102115259 | 501 | 33 | 32768
| 0 |
| 333 | tubs | 99 | 2 | 20020109113440
| 501 | 20020109113440 | 500 | 3 | 10
| 0 |
+------------+-------------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
2 rows in set (0.00 sec)
mysql> select * from cnam2;
ERROR 1032: Can't find record in 'cnam2'
mysql> select * from cnam2;
+--------+-------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| number | cname | carrier_id | privacy | last_mod_date | last_mod_id |
last_app_date | last_app_id | version | assigned_scps | status |
+--------+-------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
| 333 | tubs | 99 | 2 | 20020109113453 | 501 |
20020109113453 | 500 | 3 | 10 | 0 |
+--------+-------+------------+---------+----------------+-------------+----------------+-------------+---------+---------------+--------+
1 row in set (0.00 sec)
mysql> delete from cnam1;
Query OK, 2 rows affected (0.01 sec)
mysql> delete from cnam2;
Query OK, 1 row affected (0.02 sec)
--
Becky McElroy
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php