Forums
 This topic is locked 
             UDzone tutorials
 Posted 20 May 2002  17:59:35 
  1 
     has   voted 
  20 May 2002  17:59:35 chris williams posted: 
 Hi,I noticed in the tutorials section you have the category and in ()'s you have how many tutorials are in that section.
For example
ASP(3)
Database(4)
Ultradev(5)
I'm looking to acheive the same thing. I know when you create a recordset you have the total number of records given to you. I'd rather not create 30 different recordsets for this purpose. Is there a way to do it with one?
Thanks,
Chris
Replies
 Replied 20 May 2002  21:35:28 
   20 May 2002  21:35:28 Mitchel Tendler replied: 
  How about:
SELECT (SELECT COUNT(type) FROM yourtable WHERE type = 'ASP' as ASPcnt, (SELECT COUNT(type) FROM yourtable WHERE type = 'Database' as Databasecnt, (SELECT COUNT(type) FROM yourtable WHERE type = 'Ultradev' as Ultradevcnt
FROM yourtable
When in doubt...reboot!
  SELECT (SELECT COUNT(type) FROM yourtable WHERE type = 'ASP' as ASPcnt, (SELECT COUNT(type) FROM yourtable WHERE type = 'Database' as Databasecnt, (SELECT COUNT(type) FROM yourtable WHERE type = 'Ultradev' as Ultradevcnt
FROM yourtable
When in doubt...reboot!