Hi, I have 3 columns of data
Column 1:subscription Column 2: invoice number Column 3: Service I need to seperate the subscription types into new, renewals and additional which is fine but the next bit i am having trouble Each invoice number can have 1 or more service e.g. Invoice Number Service 123 Photocopying 123 Printing 123 Scan & Store 234 Photocopying 234 Scan & Store 345 Photocopying 345 Printing I apply a rate for each service e.g. photocopying = 1.5 printing = 1.7 but if Scan and store is in an invoice with photocopying we charge an extra 1.5 but if printing is a service with the scan and store a different rate applies 1.7 so i can't just count scan and store and apply a rate i have to figure out if it is with photocopying or with printing and then apply the rate What I want to be able to do is creat a table with columns that calculates this so i get a 4 columns: Service usage rate total photocopying 3 1.5 4.5 Printing 2 1.7 3.4 Scan & Store 1 1.5 1.5 Scan & Store w/Print 1 1.7 1.7 The problem comes in when i'm trying to count scan and store wit/without printing. I can't figure it out. I import the report from an excel spreadsheet into acces and want to run a query that does all this... thanks in advance, ainese -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en
