Query error

I have a process that updates table ITEMS with a NAME_CATEGORY and I need to
later find the corresponding index for it and insert it.

This query fails out and does not like the test.ITEMS.NAME_CATEGORY

INSERT into test.ITEMS (ID_CATEGORY)
select ID from test.CATEGORY where test.category.NAME =
test.ITEMS.NAME_CATEGORY

Any ideas?
Thanks!!!
Mica


-----sample tables
TABLE Category
-ID
-NAME

TABLE ITEMS
-ID
-ID_CATEGORY
-NAME_CATEGORY
Mica Cooper [ Mi, 06 Dezember 2006 19:00 ] [ ID #1558980 ]
Datenbanken » mailing.database.mysql » Query error

Vorheriges Thema: my query is a bit slow....
Nächstes Thema: Query references same column twice