I'm using VBA on ACCESS.I have a weird problem. Here's is the main query
INSERT INTO [Temp2] ([Prodotto pulizie],Materiale,Compatibility) VALUES
(SELECT CD.[Prodotto pulizie],CD.Materiale,CD.Risultato
FROM [Compatibilità_detergenti] as CD
WHERE CD.[Prodotto pulizie] = 'P1' and CD.Fonte = 'INTERNA' and CD.Materiale = 'ABS;);
It tells me that there is a sintax error but if i try the insert and the select separatley they work , in fact
INSERT INTO [Temp2] ([Prodotto pulizie],Materiale,Compatibility) VALUES ('P1','INTERNA','ABS')
works!
SELECT CD.[Prodotto pulizie],CD.Materiale,CD.Risultato
FROM [Compatibilità_detergenti] as CD
WHERE CD.[Prodotto pulizie] = 'P1' and CD.Fonte = 'INTERNA' and CD.Materiale = 'ABS;
works! The SELECT returns exactley the record i manually inserted in INSERT. So basically the problem only appears when i merge insert and select, is there any sintax error you can see?