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

Corporate Directory - SQL

Hi

Does anyone know where I could get my hands on the old SDK SQL Corporate Directory example script ?

Or is there anyone using another SQL Corporate Directory ?

kind regards

Gudmundur Thor Johannsson

1 REPLY
New Member

Re: Corporate Directory - SQL

Is this something you were looking for?

2 seperate scripts

select num.DNOrPattern Ext, dev.description Owner, right(dev.name, 12) MAC, typ.name Model, loc.name Location

from dbo.device dev

inner join dbo.devicenumplanmap dvn

on dev.pkid = dvn.fkDevice

inner join dbo.Location loc

on loc.pkid = dev.fkLocation

inner join dbo.typemodel typ

on dev.tkmodel = typ.enum

inner join dbo.numplan num

on dvn.fknumplan = num.pkid

where PATINDEX('%SEP%',dev.name)=1

order by Ext

select right(dev.name, 12) MAC, count(dev.description) as Lines_on_mac_address

from dbo.device dev

inner join dbo.devicenumplanmap dvn

on dev.pkid = dvn.fkDevice

inner join dbo.typemodel typ

on dev.tkmodel = typ.enum

inner join dbo.numplan num

on dvn.fknumplan = num.pkid

where PATINDEX('%SEP%',dev.name)=1

group by dev.name

115
Views
0
Helpful
1
Replies
CreatePlease to create content