sql query to pull line and device info

Unanswered Question
Nov 11th, 2007
User Badges:

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
pklos Mon, 11/12/2007 - 13:25
User Badges:
  • Silver, 250 points or more

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


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


--

regards,

pk

Live2 Bicycle Mon, 11/12/2007 - 14:11
User Badges:

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!

Actions

This Discussion