yesterday I wanted to create a sql query ( using system.data.sqlce ) which return values from diff tables on mobile devices.
My scenario is as follows: - sql table: Xtable (fields: name : is string, mat : is string, state : is int value); - XTable contains 100 records my sql statement is:
SELECT name, (SELECT count(*) from Xtable where state=0) as Marked, count(*) as Total
FROM XTable
GROUP BY name
result: 0 rows, because i have error with second SELECT.
IF I execute following sql statement:
SELECT name, count(*) as Total FROM XTable GROUP BY name
result : > 0 rows.
Sqlcecommand not support multiselect query? how can I fix it ?