Jump to content

How to extract table colums with data types used by a report


Recommended Posts

Posted

I would like to know how to retrieve the  columns and datatypes of a table  used  in a report. I used the desc [Tablename]  keyword in the Database Direct query window but nothing was  retrieved.

Posted

@Izu

The main Service Manager request table is documented in the wiki (https://wiki.hornbill.com/index.php/Table_Info:_Main_Request_Table ) but is a little bit out of date.

You can use the SQL below in Database Direct to get information on the table object for a specified table.
 

SELECT
    COLUMN_NAME, DATA_TYPE
FROM
      INFORMATION_SCHEMA.COLUMNS
WHERE
    TABLE_NAME = 'h_itsm_requests'

SELECT
	COLUMN_NAME, DATA_TYPE
FROM
  	INFORMATION_SCHEMA.COLUMNS
WHERE
	TABLE_NAME = 'h_itsm_requests'

Example output.

image.thumb.png.92d18e501ad3f0c665a23e417a3ec0a0.png

Cheers

Martyn

Posted

Hi @Izu

There is also the Application Entity Viewer which can be found in Administration under Hornbill Service Manager tile.

image.png

Once in the view you can select the Database Schema Viewer option and then select the table that you wish to look at.  

image.png

Hope that helps.

Regards,

James

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...