April 12, 2011 at 10:32 pm
Hi
I have three queries for retrieving information from database as:
select count (itemmaster.itemid)[Total Books] from itemmaster
Select count (AccNo) [Total Issued Books]from isuueRecev where passint=1
Select count(Accno) [Over Due Books]from isuuerecev where RecevDate<'2011-06-10'
and out of these as :
Total Books
14
Total Issued Books
3
Over Due Books
2
But I want output like as
Total Books Total Issued Books Over Due Books
14 3 2
Please help me how can I do so...
April 12, 2011 at 11:09 pm
SELECT
(select count (itemmaster.itemid)[Total Books] from itemmaster) as [Total Books],
(Select count (AccNo) [Total Issued Books]from isuueRecev where passint=1) as [Total Issued Books],
(Select count(Accno) [Over Due Books]from isuuerecev where RecevDate<'2011-06-10') as [Overdue Books]
Will return what you need
April 12, 2011 at 11:53 pm
Thanx it working for me....
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply