How can I make this query in SQL Server Compact Edition?

前端 未结 4 453
太阳男子
太阳男子 2020-12-20 03:57

this subquery works in SQL Server:

select systemUsers.name, 
    (select count(id) 
     from userIncidences 
     where idUser = systemUsers.id ) 
from syst         


        
4条回答
  •  长情又很酷
    2020-12-20 04:39

    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)
    

提交回复
热议问题