sql


Description

SQL query definitions storing dynamic SQL query components for report generation and data retrieval. This table manages SQL query parts including SELECT clauses, FROM statements, WHERE conditions, GROUP BY clauses, ORDER BY specifications, and paging controls to support dynamic query building, report generation, and flexible data retrieval for healthcare reporting and analytics.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
pkSqlGUID uniqueidentifier 16 (newid())

Primary key - Unique GUID identifier for each SQL query definition

sqlSelect varchar 3000 null

SELECT clause - SELECT portion of the SQL query including column specifications

sqlAggregates varchar 200 null

Aggregate functions - Aggregate functions and calculations used in the query

sqlFrom varchar 1200 null

FROM clause - FROM portion of the SQL query including table joins

sqlWhere varchar 3000 null

WHERE clause - WHERE conditions and filters for the SQL query

sqlGroup varchar 300 null

GROUP BY clause - GROUP BY specifications for data aggregation

sqlOrder varchar 200 null

ORDER BY clause - ORDER BY specifications for result sorting

sqlPaging varchar 200 null

Paging controls - Paging and limit controls for query result management

notes varchar 200 null

Query notes - Notes or comments about the SQL query purpose and usage

Indexes

Constraint Name Type Sort Column(s)
PK_sql Primary key Asc pkSqlGUID

Relationships