cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
211
Views
5
Helpful
2
Replies
Highlighted
AR7 Beginner
Beginner

Getting the Phone button template for Product using SQL

I am trying to construct the SQL for getting the Phone button template name for a particular product. The following is my query:

select p.name from phonetemplate as p inner join p.tkmodel=typemodel.pkid where typemodel.name="Cisco 6961"

But it's not working. Where am i making the mistake.

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Beginner

Re: Getting the Phone button template for Product using SQL

I've struggled with this one before as well.  Not sure what CUCM version you're running but on 11.5 the phonetemplate table uses tkmodel as the identifier for phone button templates which is stored as a numeric value instead of a string.

To view Cisco's defined correlation between numeric value/models you can query the typeproduct table:

select name,tkmodel from typeproduct

The enum value exists in the phonetemplate table as tkmodel so you can inner join on that value:

select p.name from phonetemplate as p inner join typemodel as tm on p.tkmodel=tm.enum where tm.name='Cisco 6961'

 

2 REPLIES 2
Beginner

Re: Getting the Phone button template for Product using SQL

I've struggled with this one before as well.  Not sure what CUCM version you're running but on 11.5 the phonetemplate table uses tkmodel as the identifier for phone button templates which is stored as a numeric value instead of a string.

To view Cisco's defined correlation between numeric value/models you can query the typeproduct table:

select name,tkmodel from typeproduct

The enum value exists in the phonetemplate table as tkmodel so you can inner join on that value:

select p.name from phonetemplate as p inner join typemodel as tm on p.tkmodel=tm.enum where tm.name='Cisco 6961'

 

AR7 Beginner
Beginner

Re: Getting the Phone button template for Product using SQL

Thanks, that worked for me.
CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards