I'm learning SQL from Access program.

Since each category vary in how they are monitored:

-Tracked by hours only

-Tracked by qty, hours and qty/hours.

-Tracked by pages, orders, hours, pages/hours and orders/hours.

I'm trying to figure out a way to select mrcategories.id during SELECTION
process i.e.:

SELECT  
        concat(associates.lastname,', ',associates.firstname) as Operator, 
        mrdaily.kronoshours as Hours, 
        mrdaily.pto as PTO,
/********* My question section ************/

        select mrcategories.id=3, 
        mrcategories.category as PM Order,
        mrentries.quantity as QTY,
        mrentries.hours as HOURS,
        round(mrentries.quantity/mrentries.hours,2) as 'QTY PPH',

        select mrcategories.id=4
        mrcategories.category as SURVEY,
        mrentries.quantity as QTY,
        mrentries.hours as HOURS,
        round(mrentries.quantity/mrentries.hours,2) as 'QTY PPH',

        select mrcategories.id=12
        mrcategories.category as KEY
        mrentries.hours as HOURS,

        select mrcategories.id=15
        mrcategories.category as REFUND LETTERS,
        mrentries.quantity as PAGES,
        mrentries.hours as HOURS,
        round(mrentries.quantity/mrentries.hours,2) as 'PAGES PPH',

ETC...

        
/********* End of my question section ************/
FROM    
        mrentries,      
        associates,     
        mrdaily,
        mrcategories 
WHERE   
        mrentries.iddaily=mrdaily.id 
AND     
        associates.id=mrdaily.idassociates 
AND     
        entrydate='2004-08-03'
AND
        mrcategories.id=mrentries.category;


Is it possible?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to