Jump to content

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


Izu

Recommended Posts

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.

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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...