What is Select 'X'?
This type of query is typically used to see if a row exists. If a row is found, the query will return a single character, X. Otherwise, it will be an empty result set... You could also say
sSQL.Append(" SELECT count(*) ");
sSQL.Append(" FROM ProfileInsurancePlanYear ");
sSQL.Append(" WHERE ProfileID = " + profileid.ToString() +
" AND CropYear = " + cropyear.ToString());
Which will return a result with either 0 or some positive number. Different approaches both asking the database simply to indicate whether or not any records existing matching the condition.