Start a conversation

Advanced Table Articles

  • Missing Indexes SQL suggests to create

    Please note that understanding indexes is very important before implementing any suggestions that these queries show.   Performance can be degraded by adding an incorrect or poor index to a table. Tha...

  • System Codes as of Jan 14, 2019

    Finding the system codes in our online help might be faster than looking them up in SQL server with this query: select * from HQMS_SysCodes Results: SysCodesID SysCodeDesc SysCodeType 1 ApplyToSID 0 2...

  • SQL Queries we like to use

    We have put together a number of queries that we use frequently for data analysis and we'd like to share them with you! There may be remarked out lines (--) that you can enable so that the query produ...

  • Query to show table disk size in SQL

    SELECT     t.NAME AS TableName,     s.Name AS SchemaName,     p.rows AS RowCounts,     SUM(a.total_pages) * 8 AS TotalSpaceKB,     CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)...

  • Table details - Listing the tables in QES and their functional types

    Run the following query in SQL Management Studio: SELECT objtype, objname, name, value FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', default, NULL, NULL) WHERE name = 'Type' and (value...

  • How to translate values in the QES tables

    When looking at the HQMS_Results, HQMS_serialLotAttributes and other tables that store the Value field that users enter in results into you need to do a bit of a conversion process.   This field holds...

  • Listing the tables in QES and their functional types

    Run the following query in SQL Management Studio:   SELECT objtype, objname, name, value FROM fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', default, NULL, NULL) WHERE name = 'Type' and (val...