Sunday, June 9, 2013

[T-SQL] Rollback statement in T-SQL

[T-SQL] Rollback statement in T-SQL


Rollback statement in T-SQL

Posted: 07 Jun 2013 03:22 PM PDT

The functionality of Rollback statement in T-SQL is such a way it rollbacks to the outermost nested transaction. This is true if commit is issued for inner transaction before the rollback happens in outer transaction.What happens if inner transaction is roll backed and outer transaction has an insert statement and Commit statement? Will the outer transaction also get affected and will the table contain the inserted rows?

Query if ANY record between specific time

Posted: 07 Jun 2013 06:19 AM PDT

So, say I have a record where [i]StartTime[/i] is [b]'2013-06-07 13:00:00.000' [/b]and [i]EndTime[/i] is [b]'2013-06-07 13:02:00.000'[/b]Is there a way to have T-SQL select this record if I'm querying for time between [i]StartTime[/i] and [i]EndTime[/i] that is [b]'2013-06-07 13:01:00.000'[/b]? Essentially I'm looking for all records where [i]StartTime[/i] and [i]EndTime[/i] overlap with the time I'm querying for. I can't figure out the syntax for it, and I'm not having any luck searching for it.Thanks for any help you can provide!

Money not accepted a datatype

Posted: 07 Jun 2013 04:42 AM PDT

I have the following:DECLARE BalanceDue money, ktr intbut I get a red underline under "money" and the message I get with I put the mouse over it or run the query is:'money' is not a recognized CURSOR option.?????Why is that?I change it to varchar and it works fine.Thanks,Tom

Primary Key Violation when inserting records in table

Posted: 07 Jun 2013 03:34 AM PDT

I have stored procedure which inserting records in two table.both table have primary key and when i am running that procedure it's give me errorMsg 2627, Level 14, State 1, Server SSHEIKH-DW7, Line 1Violation of PRIMARY KEY constraint 'PK_T_TBLMAINT_TABLES'. Cannot insert duplicate key in object 'Common.t_TblMaint_Tables'. The duplicate key value is (t_Employee_JobTitle).The statement has been terminated.Msg 2627, Level 14, State 1, Server SSHEIKH-DW7, Line 1Violation of PRIMARY KEY constraint 'PK_T_TBLMAINT_COL_COMMENTS'. Cannot insert duplicate key in object 'Common.t_TblMaint_Col_Comments'. The duplicate key value is (t_Employee_JobTitle, JobTitleID).The statement has been terminated.below I am give you strucature of my table as well my stored procedure and my script which Iam running and give me error above.Give me solution.I tried drop and re create constraint but now work out still give me error.Msg 1505, Level 16, State 1, Line 3The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'Common.t_TblMaint_Col_Comments' and the index name 'PK_T_TBLMAINT_COL_COMMENTS'. The duplicate key value is (t_Department, DeptCode).Msg 1750, Level 16, State 0, Line 3Could not create constraint. See previous errors.[code="sql"]/****** Object: Table [Common].[t_TblMaint_Col_Comments] Script Date: 06/07/2013 12:26:44 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Common].[t_TblMaint_Col_Comments]') AND type in (N'U'))DROP TABLE [Common].[t_TblMaint_Col_Comments]GO/****** Object: Table [Common].[t_TblMaint_Col_Comments] Script Date: 06/07/2013 12:26:44 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [Common].[t_TblMaint_Col_Comments]( [CCOM_ID] [int] IDENTITY(1,1) NOT NULL, [TableName] [varchar](50) NOT NULL, [ColumnName] [varchar](50) NOT NULL, [ColumnComment] [varchar](100) NULL, [ControlType] [varchar](50) NULL, [ColumnAlias] [varchar](50) NULL) ON [PRIMARY]GOSET ANSI_PADDING OFFGOIF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_t_TblMaint_Tables_IsActive]') AND type = 'D')BEGINALTER TABLE [Common].[t_TblMaint_Tables] DROP CONSTRAINT [DF_t_TblMaint_Tables_IsActive]ENDGO/****** Object: Table [Common].[t_TblMaint_Tables] Script Date: 06/07/2013 12:28:11 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Common].[t_TblMaint_Tables]') AND type in (N'U'))DROP TABLE [Common].[t_TblMaint_Tables]GO/****** Object: Table [Common].[t_TblMaint_Tables] Script Date: 06/07/2013 12:28:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [Common].[t_TblMaint_Tables]( [Tbl_id] [int] IDENTITY(1,1) NOT NULL, [TableName] [varchar](50) NOT NULL, [TableComment] [varchar](100) NULL, [DatabaseName] [varchar](50) NULL, [SchemaName] [varchar](50) NULL, [TableIDField] [varchar](50) NULL, [IsActive] [bit] NULL) ON [PRIMARY]GOSET ANSI_PADDING OFFGOALTER TABLE [Common].[t_TblMaint_Tables] ADD CONSTRAINT [DF_t_TblMaint_Tables_IsActive] DEFAULT ((1)) FOR [IsActive]GO/****** Object: Table [Common].[t_TblMaint_Col_DropDownData] Script Date: 06/07/2013 12:28:55 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Common].[t_TblMaint_Col_DropDownData]') AND type in (N'U'))DROP TABLE [Common].[t_TblMaint_Col_DropDownData]GO/****** Object: Table [Common].[t_TblMaint_Col_DropDownData] Script Date: 06/07/2013 12:28:55 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [Common].[t_TblMaint_Col_DropDownData]( [DDD_ID] [int] IDENTITY(1,1) NOT NULL, [CCOM_ID] [int] NULL, [LookupTableName] [varchar](50) NULL, [IDFieldName] [varchar](50) NULL, [ValueFieldName] [varchar](50) NULL, [RequiresEmptyValue] [varchar](1) NULL) ON [PRIMARY]GOSET ANSI_PADDING OFFGO[/code][code="sql"]/****** Object: Table [Common].[t_TblMaint_Tables] Script Date: 06/07/2013 12:37:14 ******/SET IDENTITY_INSERT [Common].[t_TblMaint_Tables] ONINSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (24, N'FacilityCodeXref', N'Facility: code mapping for Office facilities', N'Vision', N'Dbo', N'ID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (21, N't_Budget', N'Doctor: Budget', N'Vision', N'Common', N'ItemID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (33, N't_CallCenter_VisionLogin', N'Call Center: Vision logins of Call Center agents', N'Vision', N'dbo', N'itemID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (35, N't_Department', N'Department: Department List', N'Vision', N'Common', N'DeptID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (16, N't_Doctor', N'Doctor: general information', N'Vision', N'Common', N'DoctorID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (20, N't_Doctor_FTE', N'Doctor: FTE settings', N'Vision', N'Common', N'ItemID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (17, N't_Doctor_Role', N'Doctor: definition of roles', N'Vision', N'Common', N'RoleID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (31, N't_Doctor_Split', N'Doctor: Doctor Split', N'Vision', N'Dbo', N'DocSplitID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (34, N't_Doctor_Team', N'Doctor: Team Assignment', N'Vision', N'Common', N'ItemID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (36, N't_Employee_JobTitle', N'Job Titles:Job Titles to Department ', N'Vision', N'Common', N'JobTitleID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (18, N't_Facility', N'Facility: General information', N'Vision', N'Common', N'FacilityID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (19, N't_Facility_ExamRoom', N'Facility: Exam rooms', N'Vision', N'Common', N'RecordID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (25, N't_Facility_Group', N'Facility: definition of groups', N'Vision', N'Common', N'GroupID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (29, N't_Facility_Performance_Category', N'Facility: Performance Category', N'Vision', N'Common', N'PerfCatID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (30, N't_Facility_Performance_Score', N'Facility: Performance Score', N'Vision', N'Common', N'ItemID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (26, N't_Facility_Region', N'Facility: definition of regions', N'Vision', N'Common', N'RegionID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (28, N't_FacilitySurgical_CodeXref', N'Facility: code mapping for Surgical facilities', N'Vision', N'dbo', N'ID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (22, N't_holiday', N'Holiday List', N'Vision', N'Common', N'HolidayID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (32, N't_Procedure', N'Procedure: Procedure Codes related to Report type', N'Vision', N'Common', N'ProcedureID', 0)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (37, N't_Productivity_ClockID_Xref', N'Clock IDs:Clock IDs to Facilitie ', N'Vision', N'[External]', N'ID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (12, N't_Security_Role', N'Security: Define Roles', N'Vision', N'Common', N'RoleID', 0)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (13, N't_Security_RolePermission', N'Security: Define which Permissions each Role has', N'Vision', N'Common', N'ItemID', 0)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (14, N't_Security_User', N'Security: Define Users that have access to this system', N'Vision', N'Common', N'UserID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (15, N't_Security_UserRole', N'Security: Define which Roles the Users belong to', N'Vision', N'Common', N'ItemID', 0)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (27, N't_Team', N'Team: definition of specialty teams', N'Vision', N'Common', N'TeamID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (23, N't_VisitType', N'Visit Types', N'Vision', N'Common', N'VisitTypeID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (47, N't_Department', N'Department: Department List', N'Vision', N'Common', N'DeptID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (48, N't_Employee_JobTitle', N'Job Titles:Job Titles to Department ', N'Vision', N'Common', N'JobTitleID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (49, N't_Productivity_ClockID_Xref', N'Clock IDs:Clock IDs to Facilitie ', N'Vision', N'[External]', N'ID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (50, N't_Department', N'Department: Department List', N'Vision', N'Common', N'DeptID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (51, N't_Employee_JobTitle', N'Job Titles:Job Titles to Department ', N'Vision', N'Common', N'JobTitleID', 1)INSERT [Common].[t_TblMaint_Tables] ([Tbl_id], [TableName], [TableComment], [DatabaseName], [SchemaName], [TableIDField], [IsActive]) VALUES (52, N't_Productivity_ClockID_Xref', N'Clock IDs:Clock IDs to Facilitie ', N'Vision', N'[External]', N'ID', 1)SET IDENTITY_INSERT [Common].[t_TblMaint_Tables] OFF/****** Object: Table [Common].[t_TblMaint_Col_DropDownData] Script Date: 06/07/2013 12:37:14 ******/SET IDENTITY_INSERT [Common].[t_TblMaint_Col_DropDownData] ONINSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (13, 102, N'Common.t_Team', N'TeamID', N'TeamName ', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (16, 137, N'Common.t_Facility_Group', N'GroupID', N'GroupDescr', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (15, 145, N'Common.t_Facility', N'FacilityID', N'FacilityName ', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (17, 126, N'Common.t_Doctor_Role', N'RoleID', N'RoleDescr', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (18, 155, N'Common.t_Doctor', N'DoctorID', N'DoctorCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (23, 223, N'Common.t_Facility_Type', N'FacTypeID', N'FacTypeDescr', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (24, 225, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (25, 250, N'Common.t_Doctor', N'DoctorID', N'DoctorCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (9, 77, N'Common.t_Security_Role', N'RoleID', N'RoleName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (10, 78, N'Common.t_Security_Permission', N'PermissionID', N'Description', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (26, 256, N'Common.t_VisitType', N'VisitTypeID', N'VisitTypeCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (27, 257, N'Common.t_FinancialProcType', N'FinancialProcTypeID', N'TypeCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (28, 258, N'Common.t_HighVolumeProcType', N'HighVolumeTypeID', N'TypeCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (29, 259, N'Common.t_Surgery_Type', N'SurgTypeID', N'SurgTypeCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (30, 240, N'Common.t_Facility_Performance_Category', N'PerfCatID', N'PerfCatDescr', NULL)INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (31, 269, N'Common.t_Doctor', N'DoctorID', N'DoctorCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (32, 270, N'Common.t_Team', N'TeamID', N'TeamName ', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (33, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (34, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (35, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (36, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (37, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (38, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (39, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (40, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (41, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (42, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (11, 91, N'Common.t_Security_Role', N'RoleID', N'RoleName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (12, 92, N'Common.t_Security_User', N'UserID', N'UserLogin', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (19, 168, N'Common.t_Doctor', N'DoctorID', N'DoctorCode', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (20, 198, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (21, 214, N'Common.t_Facility_Region', N'RegionID', N'RegionName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (22, 171, N'Common.t_Budget_Type', N'BudgetTypeID', N'BudgetTypeDescr', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (43, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (44, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (45, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (46, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (47, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (48, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (49, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (50, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (51, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (52, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (53, 279, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (54, 288, N'Common.t_Department', N'DeptID', N'DeptDescription', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (55, 289, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')INSERT [Common].[t_TblMaint_Col_DropDownData] ([DDD_ID], [CCOM_ID], [LookupTableName], [IDFieldName], [ValueFieldName], [RequiresEmptyValue]) VALUES (56, 297, N'Common.t_Facility', N'FacilityID', N'FacilityName', N'0')SET IDENTITY_INSERT [Common].[t_TblMaint_Col_DropDownData] OFF/****** Object: Table [Common].[t_TblMaint_Col_Comments] Script Date: 06/07/2013 12:37:14 ******/SET IDENTITY_INSERT [Common].[t_TblMaint_Col_Comments] ONINSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (197, N'FacilityCodeXref', N'DateAdded', N'Enter Date Added', N'TextBox', N'DateAdded')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (195, N'FacilityCodeXref', N'FacilityCode', N'Enter Facility Code', N'TextBox', N'FacilityCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (198, N'FacilityCodeXref', N'FacilityID', N'Enter Facility ID', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (199, N'FacilityCodeXref', N'ID', N'ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (196, N'FacilityCodeXref', N'UseForEpis', N'Enter Use For Epis', N'TextBox', N'UseForEpis')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (171, N't_Budget', N'BudgetTypeID', N'Enter Budget Type ID', N'DropDown', N'BudgetTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (168, N't_Budget', N'DoctorID', N'Enter Doctor ID', N'DropDown', N'DoctorID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (169, N't_Budget', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (167, N't_Budget', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (176, N't_Budget', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (175, N't_Budget', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (172, N't_Budget', N'MonthlyBudget', N'Enter Monthly Budget', N'TextBox', N'MonthlyBudget')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (260, N't_CallCenter_VisionLogin', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (266, N't_CallCenter_VisionLogin', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (265, N't_CallCenter_VisionLogin', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (261, N't_CallCenter_VisionLogin', N'UserName', N'Enter User Name', N'TextBox', N'UserName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (262, N't_CallCenter_VisionLogin', N'VisionLogin', N'Enter Vision Login', N'TextBox', N'VisionLogin')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (280, N't_Department', N'DeptCode', N'Enter Dept Code', N'TextBox', N'DeptCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (281, N't_Department', N'DeptDescription', N'Enter Dept Description', N'TextBox', N'DeptDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (279, N't_Department', N'DeptID', N'Dept ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (164, N't_Doctor', N'Doctor_EndDate', N'Enter Doctor End Date', N'TextBox', N'DoctorEndDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (163, N't_Doctor', N'Doctor_StartDate', N'Enter Doctor Start Date', N'TextBox', N'DoctorStartDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (98, N't_Doctor', N'DoctorCode', N'Enter Doctor Code', N'TextBox', N'DoctorCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (97, N't_Doctor', N'DoctorID', N'Doctor ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (126, N't_Doctor', N'DoctorRoleID', N'Enter Doctor Role ID', N'DropDown', N'DoctorRoleID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (99, N't_Doctor', N'FirstName', N'Enter First Name', N'TextBox', N'FirstName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (100, N't_Doctor', N'LastName', N'Enter Last Name', N'TextBox', N'LastName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (101, N't_Doctor', N'MiddleName', N'Enter Middle Name', N'TextBox', N'MiddleName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (125, N't_Doctor', N'SortByDrno', N'Enter Sort By Drno', N'TextBox', N'SortByDRNO')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (155, N't_Doctor_FTE', N'DoctorID', N'Enter Doctor ID', N'DropDown', N'DoctorID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (156, N't_Doctor_FTE', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (157, N't_Doctor_FTE', N'FTE', N'Enter F T E', N'TextBox', N'FTE')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (154, N't_Doctor_FTE', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (161, N't_Doctor_FTE', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (160, N't_Doctor_FTE', N'ModifiedDatetime', N'Modified Datetime', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (132, N't_Doctor_Role', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (131, N't_Doctor_Role', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (128, N't_Doctor_Role', N'RoleDescr', N'Enter Role Descr', N'TextBox', N'RoleDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (127, N't_Doctor_Role', N'RoleID', N'Role ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (249, N't_Doctor_Split', N'DocSplitID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (250, N't_Doctor_Split', N'DoctorID', N'Select Doctor Code', N'DropDown', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (251, N't_Doctor_Split', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (252, N't_Doctor_Split', N'EndDate', N'Enter End Date (use 12/31/9999 if permanent)', N'TextBox', N'EndDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (269, N't_Doctor_Team', N'DoctorID', N'Enter Doctor ID', N'DropDown', N'DoctorID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (271, N't_Doctor_Team', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (268, N't_Doctor_Team', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (275, N't_Doctor_Team', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (274, N't_Doctor_Team', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (270, N't_Doctor_Team', N'TeamID', N'Enter Team ID', N'DropDown', N'TeamID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (289, N't_Employee_JobTitle', N'DefaultFacilityID', N'Enter Default Facility ID', N'DropDown', N'DefaultFacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (288, N't_Employee_JobTitle', N'DeptID', N'Enter Dept ID', N'DropDown', N'DeptID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (290, N't_Employee_JobTitle', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (287, N't_Employee_JobTitle', N'JobTitle', N'Enter Job Title', N'TextBox', N'JobTitle')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (286, N't_Employee_JobTitle', N'JobTitleID', N'Job Title ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (137, N't_Facility', N'FacilityGroupID', N'Enter Facility Group ID', N'DropDown', N'FacilityGroupID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (134, N't_Facility', N'FacilityID', N'Facility ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (136, N't_Facility', N'FacilityName', N'Enter Facility Name', N'TextBox', N'FacilityName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (223, N't_Facility', N'FacilityTypeID', N'Select Facility Type', N'DropDown', N'FacilityTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (142, N't_Facility', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (141, N't_Facility', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (214, N't_Facility', N'RegionID', N'Enter Region ID', N'DropDown', N'RegionID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (147, N't_Facility_ExamRoom', N'EffectiveDate_Start', N'Enter Effective Date_ Start', N'TextBox', N'EffectiveDate_Start')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (146, N't_Facility_ExamRoom', N'ExamRooms', N'Enter Exam Rooms', N'TextBox', N'ExamRooms')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (145, N't_Facility_ExamRoom', N'FacilityID', N'Enter Facility ID', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (152, N't_Facility_ExamRoom', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (151, N't_Facility_ExamRoom', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (144, N't_Facility_ExamRoom', N'RecordID', N'Record ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (201, N't_Facility_Group', N'GroupDescr', N'Enter Group Descr', N'TextBox', N'GroupDescr')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (200, N't_Facility_Group', N'GroupID', N'Group ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (205, N't_Facility_Group', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (204, N't_Facility_Group', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (232, N't_Facility_Performance_Category', N'IsActive', N'Enter Is Active', N'TextBox', N'IsActive')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (237, N't_Facility_Performance_Category', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (236, N't_Facility_Performance_Category', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (229, N't_Facility_Performance_Category', N'PerfCatCode', N'Enter Perf Cat Code', N'TextBox', N'PerfCatCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (230, N't_Facility_Performance_Category', N'PerfCatDescr', N'Enter Perf Cat Descr', N'TextBox', N'PerfCatDescr')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (228, N't_Facility_Performance_Category', N'PerfCatID', N'Perf Cat ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (278, N't_Facility_Performance_Category', N'Prefix', N'Prefix', N'TextBox', N'Prefix')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (277, N't_Facility_Performance_Category', N'Suffix', N'Suffix', N'TextBox', N'Suffix')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (231, N't_Facility_Performance_Category', N'Weight', N'Enter Weight', N'TextBox', N'Weight')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (241, N't_Facility_Performance_Score', N'GreaterThan', N'Enter Greater Than', N'TextBox', N'GreaterThan')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (239, N't_Facility_Performance_Score', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (242, N't_Facility_Performance_Score', N'LessOrEqualTo', N'Enter Less Or Equal To', N'TextBox', N'LessOrEqualTo')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (247, N't_Facility_Performance_Score', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (246, N't_Facility_Performance_Score', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (240, N't_Facility_Performance_Score', N'PerfCatID', N'Enter Perf Cat ID', N'DropDown', N'PerformanceCategoryID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (243, N't_Facility_Performance_Score', N'Points', N'Enter Points', N'TextBox', N'Points')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (359, N't_Department', N'DeptID', N'Dept ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (360, N't_Department', N'DeptCode', N'Enter Dept Code', N'TextBox', N'DeptCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (361, N't_Department', N'DeptDescription', N'Enter Dept Description', N'TextBox', N'DeptDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (366, N't_Employee_JobTitle', N'JobTitleID', N'Job Title ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (367, N't_Employee_JobTitle', N'JobTitle', N'Enter Job Title', N'TextBox', N'JobTitle')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (212, N't_Facility_Region', N'Modifiedby', N'Modifiedby', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (211, N't_Facility_Region', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (207, N't_Facility_Region', N'RegionID', N'Region ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (208, N't_Facility_Region', N'RegionName', N'Enter Region Name', N'TextBox', N'RegionName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (224, N't_FacilitySurgical_CodeXref', N'FacilityCode', N'Enter Facility Code', N'TextBox', N'FacilityCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (225, N't_FacilitySurgical_CodeXref', N'FacilityID', N'Select Facility', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (227, N't_FacilitySurgical_CodeXref', N'ID', N'ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (180, N't_holiday', N'Description', N'Enter Description', N'TextBox', N'Description')GOprint 'Processed 100 total records'INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (179, N't_holiday', N'HolidayDate', N'Enter Holiday Date', N'TextBox', N'HolidayDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (178, N't_holiday', N'HolidayID', N'Holiday ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (184, N't_holiday', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (183, N't_holiday', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (257, N't_Procedure', N'FinancialProcTypeID', N'Financials Procedure Type', N'DropDown', N'FinancialProcedureTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (258, N't_Procedure', N'HighVolumeTypeID', N'High Volume Procedure Type', N'DropDown', N'HighVolumeTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (254, N't_Procedure', N'ProcedureCode', N'Enter Procedure Code', N'TextBox', N'ProcedureCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (255, N't_Procedure', N'ProcedureDescr', N'Enter Procedure Description', N'TextBox', N'ProcedureDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (253, N't_Procedure', N'ProcedureID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (259, N't_Procedure', N'SurgicalTypeID', N'Surgical Procedure Type', N'DropDown', N'SurgicalTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (256, N't_Procedure', N'VisitTypeID', N'Visit Volume Procedure Type', N'DropDown', N'VisitTypeID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (298, N't_Productivity_ClockID_Xref', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (296, N't_Productivity_ClockID_Xref', N'EmpFacilityClockID', N'Enter Emp Facility Clock ID', N'TextBox', N'EmpFacilityClockID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (297, N't_Productivity_ClockID_Xref', N'FacilityID', N'Enter Facility ID', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (295, N't_Productivity_ClockID_Xref', N'ID', N'ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (75, N't_Security_Role', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (74, N't_Security_Role', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (71, N't_Security_Role', N'RoleDescription', N'Enter Role Description', N'TextBox', N'RoleDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (69, N't_Security_Role', N'RoleID', N'Role ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (70, N't_Security_Role', N'RoleName', N'Enter Role Name', N'TextBox', N'RoleName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (76, N't_Security_RolePermission', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (82, N't_Security_RolePermission', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (81, N't_Security_RolePermission', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (78, N't_Security_RolePermission', N'PermissionID', N'Enter Permission ID', N'DropDown', N'PermissionID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (77, N't_Security_RolePermission', N'RoleID', N'Enter Role ID', N'DropDown', N'RoleID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (89, N't_Security_User', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (88, N't_Security_User', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (83, N't_Security_User', N'UserID', N'User ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (84, N't_Security_User', N'UserLogin', N'Enter User Login', N'TextBox', N'UserLogin')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (85, N't_Security_User', N'UserName', N'Enter User Name', N'TextBox', N'UserName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (90, N't_Security_UserRole', N'ItemID', N'Item ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (96, N't_Security_UserRole', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (95, N't_Security_UserRole', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (91, N't_Security_UserRole', N'RoleID', N'Enter Role ID', N'DropDown', N'RoleID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (92, N't_Security_UserRole', N'UserID', N'Enter User ID', N'DropDown', N'UserID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (221, N't_Team', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (220, N't_Team', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (217, N't_Team', N'PerformsSurgery', N'Enter Performs Surgery', N'TextBox', N'PerformsSurgery')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (222, N't_Team', N'SortByTeamID', N'Enter Sort By Team ID', N'TextBox', N'SortByTeamID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (215, N't_Team', N'TeamID', N'Team ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (216, N't_Team', N'TeamName', N'Enter Team Name', N'TextBox', N'TeamName')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (191, N't_VisitType', N'ModifiedBy', N'Modified By', N'Label', N'ModifiedBy')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (190, N't_VisitType', N'ModifiedDateTime', N'Modified Date Time', N'Label', N'ModifiedDateTime')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (194, N't_VisitType', N'NewIndicator', N'Enter New Indicator', N'TextBox', N'NewIndicator')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (186, N't_VisitType', N'VisitTypeCode', N'Enter Visit Type Code', N'TextBox', N'VisitTypeCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (187, N't_VisitType', N'VisitTypeDescr', N'Enter Visit Type Descr', N'TextBox', N'VisitTypeDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (193, N't_VisitType', N'VisitTypeGroupID', N'Enter Visit Type Group ID', N'TextBox', N'VisitTypeGroupID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (185, N't_VisitType', N'VisitTypeID', N'Visit Type ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (368, N't_Employee_JobTitle', N'DeptID', N'Enter Dept ID', N'DropDown', N'DeptID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (369, N't_Employee_JobTitle', N'DefaultFacilityID', N'Enter Default Facility ID', N'DropDown', N'DefaultFacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (370, N't_Employee_JobTitle', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (375, N't_Productivity_ClockID_Xref', N'ID', N'ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (376, N't_Productivity_ClockID_Xref', N'EmpFacilityClockID', N'Enter Emp Facility Clock ID', N'TextBox', N'EmpFacilityClockID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (377, N't_Productivity_ClockID_Xref', N'FacilityID', N'Enter Facility ID', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (378, N't_Productivity_ClockID_Xref', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (379, N't_Department', N'DeptID', N'Dept ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (380, N't_Department', N'DeptCode', N'Enter Dept Code', N'TextBox', N'DeptCode')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (381, N't_Department', N'DeptDescription', N'Enter Dept Description', N'TextBox', N'DeptDescription')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (386, N't_Employee_JobTitle', N'JobTitleID', N'Job Title ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (387, N't_Employee_JobTitle', N'JobTitle', N'Enter Job Title', N'TextBox', N'JobTitle')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (388, N't_Employee_JobTitle', N'DeptID', N'Enter Dept ID', N'DropDown', N'DeptID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (389, N't_Employee_JobTitle', N'DefaultFacilityID', N'Enter Default Facility ID', N'DropDown', N'DefaultFacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (390, N't_Employee_JobTitle', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (395, N't_Productivity_ClockID_Xref', N'ID', N'ID', N'Label', N'UniqueID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (396, N't_Productivity_ClockID_Xref', N'EmpFacilityClockID', N'Enter Emp Facility Clock ID', N'TextBox', N'EmpFacilityClockID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (397, N't_Productivity_ClockID_Xref', N'FacilityID', N'Enter Facility ID', N'DropDown', N'FacilityID')INSERT [Common].[t_TblMaint_Col_Comments] ([CCOM_ID], [TableName], [ColumnName], [ColumnComment], [ControlType], [ColumnAlias]) VALUES (398, N't_Productivity_ClockID_Xref', N'EffectiveDate', N'Enter Effective Date', N'TextBox', N'EffectiveDate')SET IDENTITY_INSERT [Common].[t_TblMaint_Col_Comments] OFF[/code]below is my three tables script which i used for my script and also insert script [code="sql"]/****** Object: StoredProcedure [Common].[p_Admin_InsertTblMaintData] Script Date: 06/07/2013 12:18:55 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER procedure [Common].[p_Admin_InsertTblMaintData] (@strTableName varchar(50), @strTableComment varchar(100), @strDatabaseName varchar(50), @strSchemaName varchar(50), @strIDFieldName varchar(50))as/*Exec [Common].[p_Admin_InsertTblMaintData] 't_Department','Department: Department List','Vision','Common','DeptID'*/begin declare @statement nvarchar(max), @cnt int, @strSchTableName varchar(300)select @statement = 'insert into Common.t_TblMaint_Tables (TableName, TableComment,DatabaseName, SchemaName, TableIDField) Values (''' + @strTableName + ''',''' + @strTableComment + ''',''' + @strDatabaseName + ''',''' + @strSchemaName +''',''' + @strIDFieldName +''')'exec sp_executesql @statementselect @strSchTableName = @strSchemaName + '.' + @strTableName declare c cursor for select 'insert into Common.[T_TblMaint_Col_Comments] (TableName,ColumnName, ColumnComment, ControlType, ColumnAlias) values (''' + @strTableName + ''', ''' + name + ''', ''Enter ' + [Common].[f_AddSpaceWhenUCase](name) + ''', ''TextBox'',''' + name + ''' )' from syscolumns where id = OBJECT_ID(@strSchTableName) open c fetch c into @statement while (@@FETCH_STATUS = 0) begin exec (@statement) fetch next from c into @statement end close c deallocate c set @statement = 'Update Common.[T_TblMaint_Col_Comments] set ControlType = ''Label'', ColumnComment =replace(ColumnComment, ''Enter '', '''') where TableName = ''' + @strTableName +''' and ColumnName in (''' + @strIDFieldName + ''', ''CreatedBy'', ''CreatedDateTime'', ''ModifiedDateTime'',''ModifiedBy'')' exec (@statement) set @statement = 'Update Common.[T_TblMaint_Col_Comments] set ColumnComment =replace(ColumnComment, ''I D'', ''ID'') where TableName = ''' + @strTableName + '''' exec (@statement) --set @statement = 'Update Common.[T_TblMaint_Col_Comments] set ColumnAlias = ''UniqueID'' where COLUMNPROPERTY(object_id(''' + @strSchTableName + ', ColumnName, ''isidentity'')=1 ' set @statement = 'Update Common.[T_TblMaint_Col_Comments] set ColumnAlias = ''UniqueID'' where ColumnAlias =''' + @strIDFieldName + ''' and TableName = ''' + @strTableName + '''' exec (@statement) end[/code]Below is my stored procedure which inserting records in to tables.[code="sql"]Go/*Department */Exec [Common].[p_Admin_InsertTblMaintData] 't_Department','Department: Department List','Vision','Common','DeptID'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Department' and [ColumnName] = 'CreatedBy'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Department' and [ColumnName] = 'CreatedDateTime'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Department' and [ColumnName] = 'ModifiedBy'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Department' and [ColumnName] = 'ModifiedDateTime'Insert Into Common.t_TblMaint_Col_DropDownData (CCOM_ID,LookupTableName,IDFieldName,ValueFieldName,RequiresEmptyValue)Values (279,'Common.t_Department','DeptID','DeptDescription','0')-----------------------------------------------------------------/*Employee Job Titles */Exec [Common].[p_Admin_InsertTblMaintData] 't_Employee_JobTitle','Job Titles:Job Titles to Department ','Vision','Common','JobTitleID'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Employee_JobTitle' and [ColumnName] = 'CreatedBy'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Employee_JobTitle' and [ColumnName] = 'CreatedDateTime'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Employee_JobTitle' and [ColumnName] = 'ModifiedBy'Delete From Common.t_TblMaint_Col_CommentsWhere [TableName] = 't_Employee_JobTitle' and [ColumnName] = 'ModifiedDateTime'Update [Common].[t_TblMaint_Col_Comments]Set ControlType = 'DropDown'Where TableName = 't_Employee_JobTitle' and ColumnName = 'DefaultFacilityID' Update [Common].[t_TblMaint_Col_Comments]Set ControlType = 'DropDown'Where TableName = 't_Employee_JobTitle' and ColumnName = 'DeptID'Insert Into Common.t_TblMaint_Col_DropDownData (CCOM_ID,LookupTableName,IDFieldName,ValueFieldName,RequiresEmptyValue)Values (288,'Common.t_Department','DeptID','DeptDescription','0')Insert Into Common.t_TblMaint_Col_DropDownData (CCOM_ID,LookupTableName,IDFieldName,ValueFieldName,RequiresEmptyValue)Values (289,'Common.t_Facility','FacilityID','FacilityName','0')---------------------------------------------------------------------/*Clock IDs to Facilities*/Exec [Common].[p_Admin_InsertTblMaintData] 't_Productivity_ClockID_Xref','Clock IDs:Clock IDs to Facilitie ','Vision','[External]','ID'Update [Common].[t_TblMaint_Col_Comments]Set ControlType = 'DropDown'Where TableName = 't_Productivity_ClockID_Xref' and ColumnName = 'FacilityID'Insert Into Common.t_TblMaint_Col_DropDownData (CCOM_ID,LookupTableName,IDFieldName,ValueFieldName,RequiresEmptyValue)Values (297,'Common.t_Facility','FacilityID','FacilityName','0')Go[/code]for first time running perfactl alright but when I am trying to couple of times then give me error.

Case statement with subquery

Posted: 07 Jun 2013 04:55 AM PDT

I have a CASE statement with a subquery that works most of the time but if the subquery comes back with zero rows, I get a null and I want that null to be a zero instead.How would I change it to handle that.CASE WHEN TypeId = 8 THEN ( SELECT Balance FROM InvoicePayments WHERE InvoicePaymentIdId = dd.InvoicePmtId ) ELSE CAST(0.00 AS money)END AS BalanceDue , I tried putting an ISNULL around the subquery and it just returned nothing in that case.Thanks,Tom

Adding time

Posted: 07 Jun 2013 02:51 AM PDT

I need to add time to a value. The value is stored as char(4) - example '0630'.I know to use the dateadd function but how do I format the '0630' into an acceptable parameter?

No comments:

Post a Comment

Search This Blog