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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

sql query to pull line and device info

I have two tables dbo_device that holds the device info and table dbo_DeviceNumPlanMap that holds the line info for a device. I am trying to pull the e164mask info and associate with the device description info.

This is my query

SELECT dbo_Device.Name, dbo_Device.Description, dbo_DeviceNumPlanMap.Label, dbo_DeviceNumPlanMap.Display, dbo_DeviceNumPlanMap.E164Mask

FROM dbo_Device RIGHT JOIN dbo_DeviceNumPlanMap ON dbo_Device.ikDevice_DefaultProfile = dbo_DeviceNumPlanMap.fkDevice

WHERE (((dbo_DeviceNumPlanMap.E164Mask)='3175551212'));

The issue is I cant really find any fields between the two that coorolate. I found one field but that only match device profiles.

Is there another table I should be including to get the info I need?

2 REPLIES
Silver

Re: sql query to pull line and device info

You should also check NumPlan table (DeviceNumPlanMap.fkNumPlan = NumPlan.pkid)

E164 number you can get using deviceNumPlanMap.e164mask and numplan.dnorpattern fields

--

regards,

pk

New Member

Re: sql query to pull line and device info

I started playing with the SQl Database Diagram tool. I figured out when I included the Device table and the DeviceNumPlanMap table it did the diagram then I could look at the connecting line between the two tables. The properties of the connecting line showed me what fields matched. The Device - PKID field

DeviceNumPlanMap - fkDevice field

Matched

Hope this helps someone else!

137
Views
4
Helpful
2
Replies
CreatePlease login to create content