Actually I am trying to retrieve values in a single step. My queries need to be something like,
select count(*) from tbl1 where state='Normal';select count(*) from tbl1 where state='Critical' I got to have these two as seperate, because if there's any critical need to display a diff icon, and also the sum of those results. So wondering how can I avoid two table scans, and instead try to retrieve them in a single statement. .. Chetana ----- Original Message ---- From: A. Pagaltzis <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Thursday, December 28, 2006 11:21:28 AM Subject: [sqlite] Re: multiple selects in a single prepare * chetana bhargav <[EMAIL PROTECTED]> [2006-12-28 06:00]: > Just wanted to know can we have multiple quries in a single > prepare statement seperated by semicolons.Something like, > > Select count(*) from tbl where name="foo";select count(*) from tbl1 where > name = "bar" Just how is that supposed to work? Are you looking for the UNION operator, perchance? Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] ----------------------------------------------------------------------------- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com