At 9:32 -0600 2/17/03, Mayo, Chuck wrote:
>Just jumped on the list, hoping someone can give me a hand. The query below
>uses a join, I guess, to select records from table stat_1_1 based on
>information in table stat. I'd like to be able to turn this query into a
>delete query but only want records removed from stat_1_1. Can anyone tell me
>how? I must be missing something really obvious.
Replace SELECT DISTINCT with DELETE. :-)
You need MySQL 4.0.x for this to work. Probably at least 4.0.2.
> SELECT DISTINCT
> && stat_1_1.stat_id = stat.id
> && stat.stat_group = "Individual"