a query !!! please help me fast fast fast
-
i what to have an insert transact in ms access 2003 this insert statement should retrieve an ID from another table and then insert informations some thing like :
insert into myTable values(123,'123',123,123,
(select DISTINCT ID from ServiceGroupsInfo where NodeName='abc') ):(( :(( :(( but it does not work what should i do????? please help me!
-
i what to have an insert transact in ms access 2003 this insert statement should retrieve an ID from another table and then insert informations some thing like :
insert into myTable values(123,'123',123,123,
(select DISTINCT ID from ServiceGroupsInfo where NodeName='abc') ):(( :(( :(( but it does not work what should i do????? please help me!
-
i what to have an insert transact in ms access 2003 this insert statement should retrieve an ID from another table and then insert informations some thing like :
insert into myTable values(123,'123',123,123,
(select DISTINCT ID from ServiceGroupsInfo where NodeName='abc') ):(( :(( :(( but it does not work what should i do????? please help me!
Looks to me like you are missing the field list. Eg.
insert into myTable
(field1, field2, field3, field4, field5)
values(123,'123',123,123,(select DISTINCT ID from ServiceGroupsInfo
where NodeName='abc'))though I would further modify it to:
insert into myTable
(field1, field2, field3, field4, field5)
Select Distinct
123,'123',123,123, ID
from ServiceGroupsInfo
where NodeName='abc';I'm not convinced by the distinct either, as surely
ServiceGroupsInfo
is unique byNodeName
, or it will give multiple results for ID anyway.If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles] [My Website]