Jump to content

Archived

This topic is now archived and is closed to further replies.

Firemankurt

MULTI DELETE

Recommended Posts

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

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

[code]
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
[/code]

Share this post


Link to post
Share on other sites
Not entirely sure... I'm not familiar with that syntax though; what version of MySQL are you running?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.