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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nice Database Query

Status
Not open for further replies.

duncan1mc

Programmer
May 11, 2010
2
GB
I am trying to run a query to get a list of phones by MAC address that are setup to be recorded. We are using Nice Perform 3.1

Has anyone got any tips on how to do this?
 
You may need to modify slightly to get MAC rather than Trunk or Extension Number however a starting point:

Dynamic Channel Mapping SQL Query:
USE nice_admin
SELECT DISTINCT nvcSourcePoolName [Pool Name], nvcDeviceNumber [Extension]
FROM tblCLSCMSource, tblCLSCMSourcePool, tblCLSCMSourcePoolName
WHERE tblCLSCMSourcePool.iDeletionVersionID is NULL
and tblCLSCMSourcePool.iSourceID = tblCLSCMSource.iSourceID
and tblCLSCMSourcePool.iSourcePoolID = tblCLSCMSourcePoolName.iSourcePoolID
ORDER BY nvcSourcePoolName, nvcDeviceNumber

Static Extension Mapping:
use nice_Admin
SELECT DISTINCT tblSystemResource.vcResourceName[Logger Name],
tblSystemResource.nvcInternalId[LG Serial Num],
tblSystemResource.vcLocation[LG Machine Name],
tblCLSCMChannel.iChannelNumber[LG Channel],
tblCLSCMSource.nvcDeviceNumber[Extension]
--tblCLSCMStaticMapping.iChannelID,
--tblCLSCMStaticMapping.iSourceID,
--tblCLSCMSource.iSWitchID
FROM tblCLSCMStaticMapping,
tblCLSCMSource,
tblCLSCMChannel,
tblSystemResource
WHERE tblCLSCMStaticMapping.iDeletionVersionID is NULL
and tblCLSCMSource.iSourceID = tblCLSCMStaticMapping.iSourceID
and tblCLSCMChannel.iChannelID = tblCLSCMStaticMapping.iChannelID
and tblCLSCMChannel.nvcLoggerResourceID = tblSystemResource.iResourceID
ORDER BY tblCLSCMChannel.iChannelNumber
 
Thanks for that, I'll try it out and let you know how I get on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top