On 11/4/2014 4:47 PM, Drago, William @ CSG - NARDAEAST wrote:
                         "SELECT count(1) DatasetID FROM UUT_Info where DatasetID = " + 
id + ";";

You could do

select exists (select 1 from UUT_Info where DatasetID = :id);

This returns 0 or 1 (record absent/present). May work faster than the variant using count() if there are many records satisfying the condition (EXISTS stops as soon as it finds the first matching record), but that may not be a consideration in your case (DatasetID sounds like primary key).
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to