Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question

Status
Not open for further replies.

JG41099

Programmer
Aug 12, 2005
3
US
Hello,
It has been awhile since I have had to any database programing. I want to find out the sum of the two tables minus one hour and 15 minutes.
Example
sum(TI_AUXTIME1)+sum(TIAUXTIME2)-01:15:00
Any help would be appreciated
 
I'm assuming that T1_AUXTIME1 and T1_AUXTIME2 are datetime (or some other time datatype) fields from different tables, is that right?

I think it might be best to tell us what the times are stored as first as that would dictate which way the calculations take place.
 
Well it is a avaya phone system database. It does not let me into the actual database, it just gives me the tables.I can do simple equations with the tables. So I cannot write any select statements. TI_AUXTIME1 is the table that records time of lunch and TI_AUXTIME2 is the table that records break.I hope that helps
 
Hmm, not really. My experience of phone systems unfortunately is the other end of them. If that's the case, I'm assuming that the time is recorded as minutes then? (e.g. 60 for lunch, 15 for break?) If that's the case, then it should be just a case of doing 2 select SUM statements, adding those and subtracting 75 from them.

If they are start and end times (2 different fields) then that would be more difficult. Maybe someone who admins the Avaya system might have a better clue than I would.

Are you performing the queries in SQL by the way?
 
Thanks for your help. Unfortunately, It does not let me do any SQL querys.
 
It may be a silly question, but have you tried here?

I'd bet you'd have more success there. Sorry I couldn't help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top