this subquery works in SQL Server:
select systemUsers.name,
(select count(id)
from userIncidences
where idUser = systemUsers.id )
from syst
Thanks guys, DoctaJonez, I found your little post the most helpful with my subquery. Your syntax seems to work with SQL Server Compact v3.5. Here is the query I tried (which works).
By the way, the hardcoded value you see (38046), I know at the time of running the query
insert into tLink (start,stop,associativeobject,linktype,id,name,guid,createTime,modifyTime,externalID,description,linkLabel,LinkDetails)
select newtable.id,stop,associativeobject,linktype,newtable.id,name,guid,createTime,modifyTime,externalID,description,linkLabel,LinkDetails from tLink l, (select id, '38046' as newid from tObject Where name = 'Step 1' and id <> '38046') as newtable
where l.start = newtable.newid and start in (38046)