sSQL.Append(" SELECT 'X' ");
sSQL.Append(" FROM ProfileInsurancePlanYear ");
sSQL.Append(" WHERE ProfileID = " + profileid.ToString() + " AND CropYear = " + cropyear.ToString());
This was a query that was originally hitting an access back end. I have moved it over to SQLCE and am perplexed about what this query is supposed to do.
The table structure it hits is:
ProfileID
InsurancePlanID
CropYear
INsurance_Price
Levels_XML
I am assuming this would select something from the Levels_XML column where the profileid and cropyear match?
Does this even work in sqlCE?
SELECT 1 WHERE EXISTS (..query here..)
would be better and checks for 0 or 1 rows – Bloody