Voice over IP Cisco - SQL Gurus - Need Help With CDR Command

This is Interesting: Free IT Magazines  
Home > Archive > Voice over IP Cisco > March 2006 > SQL Gurus - Need Help With CDR Command





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SQL Gurus - Need Help With CDR Command
Stu Packett

2006-03-30, 11:58 pm

I generally use the SQL query command below, but the time is not
correct. It appears to be 8 hours off which is the same amount of hours
offset for Pacific time zone. Does anyone know what I need to add to
have the query commands to reflect the -8:00 PST time zone?

select callingpartynumber, finalcalledpartynumber, datetimeorigination,
datetimedisconnect, duration, duration, DATEADD(ss, datetimeorigination,
'Jan 1, 1970 00:00:00')
from calldetailrecord
where originalcalledpartynumber = '9911'

Thanks.



Disclaimer: If you have received this message in error, call (650)
988-8500 and delete or destroy any copy of this message.


Wes Sisk

2006-03-30, 11:58 pm

I usually modify the 'jan 1 1970 00:00:00' to compensate for offset.

I am EST so I use 'dec 31, 1970 19:00:00'

otherwise you can wrap another dateadd around the one you are using.

/Wes

On Mar 28, 2006, at 4:37 PM, Stu Packett wrote:

I generally use the SQL query command below, but the time is not
correct. It appears to be 8 hours off which is the same amount of
hours offset for Pacific time zone. Does anyone know what I need to
add to have the query commands to reflect the -8:00 PST time zone?

select callingpartynumber, finalcalledpartynumber,
datetimeorigination, datetimedisconnect, duration, duration, DATEADD
(ss, datetimeorigination, 'Jan 1, 1970 00:00:00')

from calldetailrecord
where originalcalledpartynumber = '9911'

Thanks.



Disclaimer: If you have received this message in error, call (650)
988-8500 and delete or destroy any copy of this message.

________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Wes Sisk

2006-03-30, 11:58 pm

doh! 'dec 31, 1969'


On Mar 28, 2006, at 8:24 PM, Wes Sisk wrote:

I usually modify the 'jan 1 1970 00:00:00' to compensate for offset.

I am EST so I use 'dec 31, 1970 19:00:00'

otherwise you can wrap another dateadd around the one you are using.

/Wes

On Mar 28, 2006, at 4:37 PM, Stu Packett wrote:

I generally use the SQL query command below, but the time is not
correct. It appears to be 8 hours off which is the same amount of
hours offset for Pacific time zone. Does anyone know what I need to
add to have the query commands to reflect the -8:00 PST time zone?

select callingpartynumber, finalcalledpartynumber,
datetimeorigination, datetimedisconnect, duration, duration, DATEADD
(ss, datetimeorigination, 'Jan 1, 1970 00:00:00')

from calldetailrecord
where originalcalledpartynumber = '9911'

Thanks.



Disclaimer: If you have received this message in error, call (650)
988-8500 and delete or destroy any copy of this message.

________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip

________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Stu Packett

2006-03-30, 11:58 pm

Thanks Wes. That makes sense.

________________________________

From: Wes Sisk [mailto:wsisk@cisco.com]
Sent: Tuesday, March 28, 2006 5:27 PM
Cc: Stu Packett; cisco-voip@puck-nether.net Voip
Subject: Re: [cisco-voip] SQL Gurus - Need Help With CDR Command


doh! 'dec 31, 1969'


On Mar 28, 2006, at 8:24 PM, Wes Sisk wrote:

I usually modify the 'jan 1 1970 00:00:00' to compensate for offset.

I am EST so I use 'dec 31, 1970 19:00:00'

otherwise you can wrap another dateadd around the one you are using.

/Wes

On Mar 28, 2006, at 4:37 PM, Stu Packett wrote:


I generally use the SQL query command below, but the time is not
correct. It appears to be 8 hours off which is the same amount of hours
offset for Pacific time zone. Does anyone know what I need to add to
have the query commands to reflect the -8:00 PST time zone?

select callingpartynumber, finalcalledpartynumber, datetimeorigination,
datetimedisconnect, duration, duration, DATEADD(ss, datetimeorigination,
'Jan 1, 1970 00:00:00')

from calldetailrecord
where originalcalledpartynumber = '9911'

Thanks.



Disclaimer: If you have received this message in error, call (650)
988-8500 and delete or destroy any copy of this message.

________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip

________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com