Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

SQL query Mac Address and Line 1/Primary line (4.1.3)

Is there any way to have an sql query where i can capture the Primary line/DN/Line 1 along with the mac , description etc. HEre is waht i use so far

select NumPlan.DNOrPattern as DirectoryNumber, Device.Name as DeviceName, Device.Description as UserDeviceProfileName, Device.LoginUserid as UserId, DeviceNumPlanMap.Display as DisplayIntCallerID,DeviceNumPlanMap.Label as LineTextLabel,

TypeModel.Name AS PhoneType,DeviceNumPlanMap.E164Mask as ExtPhoneMask, NumPlan.CFADestination as CallFWDALL, NumPlan.CFNADestination as CallFWDNoAnswer, NumPlan.CFBDestination as CallFWDBusy, devicepool.Name as DevPoolName

from numplan, devicenumplanmap, devicepool, device ,TypeModel

where DeviceNumPlanMap.fknumplan = numplan.pkid

and DeviceNumPlanMap.fkdevice = device.pkid

and device.fkdevicepool = devicepool.pkid

and device.tkmodel = typemodel.enum

and numplan.tkPatternUsage = 2

order by numplan.DnOrPattern

thanks

2 REPLIES
New Member

Re: SQL query Mac Address and Line 1/Primary line (4.1.3)

you're getting there. you will also need to reference devicenumplanmap.numplanindex so that you get the details of only the first line

... and devicenumplanmap.numplanindex = 1 ...

New Member

Re: SQL query Mac Address and Line 1/Primary line (4.1.3)

Thanks, I;ll try those parameters

151
Views
4
Helpful
2
Replies
CreatePlease to create content