well I'll set the connection etc. aside for a minute and give you a example of the SQL statement. it will actually be easier then it sounds,
<%
SQLtxt = "SELECT COUNT(*) FROM tablename WHERE AssetType = 'Server'"
conn.execute(SQLtxt)
%>
that's it, the same with the other field
this with the table you have above will output a value of 2
A language that doesn't affect the way you think about programming is not worth knowing.
Heres one that should return all of the information grouped similar to what you had above:
SQLtxt = "SELECT COUNT(Name) as numEntries, AssetType FROM tablename GROUP BY AssetType ORDER BY AssetType"
That will return a recordset that looks like:
2 Monitor
2 Server
etc...
-Tarwn "If you eat a live toad first thing in the morning, nothing worse will happen all day long." - California saying "To you or the toad" - Niven's restatement of California saying "-well most of the time anyway..." - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
Actually I wouldn't even had remembered the correct way to do that if I hadn't used it a couple days ago
I'm out of town right now so i am enjoying a very rare moemnt of actually being able to get on the forum
-Tarwn "If you eat a live toad first thing in the morning, nothing worse will happen all day long." - California saying "To you or the toad" - Niven's restatement of California saying "-well most of the time anyway..." - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.