Jump to content


Photo

MULTI DELETE


  • Please log in to reply
1 reply to this topic

#1 Firemankurt

Firemankurt
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts
  • LocationWashington State

Posted 09 October 2006 - 02:23 AM

Here are three queries.  Why does the last one fail?

Been messing with this for hours and am mystified. Any help is greatly appreciated.

mysql> SELECT * FROM  `MPAConfig` WHERE  MPAConfig.Setting = 'AccessGrps' AND  MPAConfig.Par1 = 'Z';
+------------+------+-----------------+------+-------+
| Setting    | Par1 | Par2            | Par3 | Par4  |
+------------+------+-----------------+------+-------+
| AccessGrps | Z    | FULL POWER USER | 0    | 10000 |
+------------+------+-----------------+------+-------+

mysql> SELECT * FROM
    -> `MPAPgGrpMem`
    -> WHERE
    -> (MEM
    -> BETWEEN
    -> 0 AND 10000 )
    -> AND
    -> GRP = '1';
+-----+------+
| GRP | MEM  |
+-----+------+
|   1 |  262 |
|   1 | 1001 |
+-----+------+
2 rows in set (0.00 sec)


mysql> DELETE FROM
    -> `MPAPgGrpMem`
    -> USING
    -> `MPAConfig`
    -> WHERE
    -> MPAConfig.Setting = 'AccessGrps'
    -> AND
    -> MPAConfig.Par1 = 'Z'
    -> AND
    -> (MPAPgGrpMem.MEM
    -> BETWEEN
    -> MPAConfig.Par3 AND MPAConfig.Par4 )
    -> AND
    -> MPAPgGrpMem.GRP = '1'
    -> ;
ERROR 1109 (42S02): Unknown table 'MPAPgGrpMem' in MULTI DELETE


#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 09 October 2006 - 05:56 AM

Not entirely sure... I'm not familiar with that syntax though; what version of MySQL are you running?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users