cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1402
Views
5
Helpful
2
Replies

Getting the Phone button template for Product using SQL

AR7
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

derek.fraser
Level 1
Level 1

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'

 

View solution in original post

2 Replies 2

derek.fraser
Level 1
Level 1

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'

 

Thanks, that worked for me.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: