cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Select for viewing keyword values by itemnum.

David_Kranes
Confirmed Champ
Confirmed Champ

I would like to get the SQL that would be generated when you right click a document in Unity or thick client and click View Keywords.  In other words, I need the SQL that will list the keywords and their values for a specified document.

Thank you,

David

1 ACCEPTED ANSWER

Ansley_Ingram
Elite Collaborator
Elite Collaborator

Hi David,

First, thank you for using Community! I see that you've posted several questions about the OnBase schema recently and want to make sure that you have the best information available to answer your questions.

The majority of commonly used tables and columns for reporting - including information about how Keywords and their various configurations relate to documents - can be found in the Database Reporting Guide posted here on Community. I encourage you to read through the document and save it as reference any time you are needing to write a query to select data from the OnBase database. 

An additional suggestion - especially if the information you are looking for is not in the guide or if some of the table relationships in the guide aren't clear to you - is to use either Verbose from the OnBase Client/Configuration or Diagnostics Console with the database tab enabled from the Core to see what queries the software is generating when you perform a specific task. 

Although this particular question is fairly well documented in the aforementioned guide, a good example would be your question here. Enable verbose in the Client (through the Help > About menu) and then retreive a document's keyword panel. Open up the verbose log, scroll to the bottom and you'll see the query/queries that OnBase issued to populate the keyword panel. 

The guide also contains some important information and recommendations on querying the OnBase database to protect against introducing performance issues when reporting - some specific to indexes and some to isolation levels. It's a fairly thorough read over the most common things people need to query for. 

Hope that helps.

Ansley

View answer in original post

3 REPLIES 3

Brodie_Franklin
Champ in-the-making
Champ in-the-making
Hi David,

This isn't an answer to your question but I think it will help you get started. You can use the table "itemtypexkeyword" to find numbers for all keywords that are assigned to a particular document type. Knowing this you can write a query that searches for all the keywords associated with a document's specific doc handle/itemnum.

I know there are more elegant methods to do this, but don't know what they are (I'm just learning how to write queries).

Good luck,
Brodie

Ansley_Ingram
Elite Collaborator
Elite Collaborator

Hi David,

First, thank you for using Community! I see that you've posted several questions about the OnBase schema recently and want to make sure that you have the best information available to answer your questions.

The majority of commonly used tables and columns for reporting - including information about how Keywords and their various configurations relate to documents - can be found in the Database Reporting Guide posted here on Community. I encourage you to read through the document and save it as reference any time you are needing to write a query to select data from the OnBase database. 

An additional suggestion - especially if the information you are looking for is not in the guide or if some of the table relationships in the guide aren't clear to you - is to use either Verbose from the OnBase Client/Configuration or Diagnostics Console with the database tab enabled from the Core to see what queries the software is generating when you perform a specific task. 

Although this particular question is fairly well documented in the aforementioned guide, a good example would be your question here. Enable verbose in the Client (through the Help > About menu) and then retreive a document's keyword panel. Open up the verbose log, scroll to the bottom and you'll see the query/queries that OnBase issued to populate the keyword panel. 

The guide also contains some important information and recommendations on querying the OnBase database to protect against introducing performance issues when reporting - some specific to indexes and some to isolation levels. It's a fairly thorough read over the most common things people need to query for. 

Hope that helps.

Ansley

David_Kranes
Confirmed Champ
Confirmed Champ

Ansley, this is awesome!  I turned on verbose and it provided exactly what I was looking for.

Thakn you!

David