Insert into

I

I M

INSERT INTO table1( Value1, Value2, Value3, Value4, Value5)
VALUES ((SELECT max(o.Id) FROM table2 As o), 11, 55, 66, 55);


this query throw error (No. -3025).
What's wrong?
 
D

Dennis

You cannot have dots in field names in tables so Max(o.ID) is not valid. You
need to put the correct field name the item in table2, possibly just ID
max(ID) ......
 
D

David Lloyd

I would try something like this:

INSERT INTO Table1 (Value1, Value2, Value3, Value4, Value5)
SELECT max(o.Id), 11, 55, 66, 55
FROM Table2

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


INSERT INTO table1( Value1, Value2, Value3, Value4, Value5)
VALUES ((SELECT max(o.Id) FROM table2 As o), 11, 55, 66, 55);


this query throw error (No. -3025).
What's wrong?
 
Top