To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

HOME News MS SQL Oracle DB2 Access MySQL PHP Scripts Books Links DBA Talk


Go Back   Database Journal Forums > Miscellaneous > Database Programming

Database Programming Discussion on all database programming topics, including ASP-db, ASP.NET, ASP and PHP.

Reply Post New Thread
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-22-2009, 03:24 PM
defautt defautt is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
count of field

What I need help with is getting the diff. of two fields as a %.

Here's what i have

Equip. Desc.
Work Orders
Tasks

For each Equip. Desc. there are multiple work orders, and task numbers.

I need to get the count of work orders for each equip. and the count of tasks for each equip. Then get the percentage of work orders that are not tasks.

Ex.
Equip. = Falcon Wash
Count of W.O. = 554
Count of Tasks = 449
which means that 18.95% of the total work orders for the Falcon Wash are not tasks.

The fields now do not display the count of, but the ref number for each Work order and Task number.

Any advice or help is greatly appreciated.

I am certainly just starting out on this stuff, so if possible keep it simple for me.

Thank You.
Reply With Quote
  #2  
Old 08-12-2009, 12:11 PM
Frank Frank is offline
Super Moderator
 
Join Date: Oct 2002
Posts: 929
You can use COUNT in the SQL to do that. Are you using ASP-db or this is just a general SQL question?

Frank
Reply With Quote
Reply Post New Thread

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:06 PM.


DatabaseJournal Recent Articles


 » Top 10 SQL Server 2008 Database Administra...

 » A First Look at SQL Server 2008 R2 Master ...

 » Redmond exploits MySQL uncertainty

 » Oracle Launches Oracle Global Trade Manage...

 » SQL Server 2008 RTM Support Ends April 13,...

Search Database Journal:
 







Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.