July 1, 2011 at 12:55 pm
All I am having some trouble with a query concept. I know this will be easy for you but it is kickin my butt. I want to select records that are 'Active' the active state is defined by a column in another table (StatusCodes where ActiveStatus = 1).
-----------------------
My current (ugly) query
-----------------------
SELECT p.PartID,
case
when MInitial is null then (PartFName + ' ' + PartLName)
when MInitial is not null then (PartFName + ' ' + MInitial + ' ' + PartLName)
end as PartFName,
case
when MInitial is null then (PartFName + ' ' + PartLName)
when MInitial is not null then (PartFName + ' ' + MInitial + ' ' + PartLName)
end AS PartName
FROM Participants p
inner join Cases c on p.PartID = c.PartID
where PartFName <> '' and p.IsDeleted != 'true'
--This is what I want to replace somehow...
and c.[Status] != 2 and c.[Status] != 3
and c.[Status] != 5 and c.[Status] != 9
and c.[Status] != 10 and c.[Status] != 11
----------------------------
DDL
----------------------------
GO
/****** Object: Table [dbo].[StatusCodes] Script Date: 07/01/2011 11:47:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StatusCodes](
[StatusID] [int] IDENTITY(50,1) NOT NULL,
[StatusDescription] [nvarchar](50) NULL,
[ActiveStatus] [bit] NULL,
CONSTRAINT [PK_StatusCodes] PRIMARY KEY CLUSTERED
(
[StatusID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[StatusCodes] ON
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (1, N'Active', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (2, N'Suspended', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (3, N'Terminated', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (4, N'Leave', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (5, N'Completed', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (6, N'Reinstated', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (7, N'Phase 2', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (8, N'Transfer In (Same County)', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (9, N'Transfer Out (In County)', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (10, N'Transfer Out (Out of County)', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (11, N'Client Deceased', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (12, N'Not Enrolled', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (13, N'Extended', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (14, N'Transfer In (from Other County)', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (15, N'Referred', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (16, N'Payment Schedule Change', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (17, N'Bench Warrant', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (18, N'Return from Hold', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (19, N'Hold', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (20, N'Imperative', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (21, N'Program Change', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (22, N'Final Reinstate', 1)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (23, N'No Show', NULL)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (24, N'F/C per Court', NULL)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (25, N'B/W Cleared', NULL)
INSERT [dbo].[StatusCodes] ([StatusID], [StatusDescription], [ActiveStatus]) VALUES (26, N'B/W Letter', NULL)
SET IDENTITY_INSERT [dbo].[StatusCodes] OFF
/****** Object: Table [dbo].[Participants] Script Date: 07/01/2011 11:47:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Participants](
[PartID] [int] IDENTITY(1,1) NOT NULL,
[DateEntered] [datetime] NULL,
[PartDLNum] [nvarchar](15) NULL,
[PartLName] [nvarchar](30) NULL,
[PartFName] [nvarchar](30) NULL,
[PartAddr] [nvarchar](30) NULL,
[PartCity] [nvarchar](30) NULL,
[PartState] [nvarchar](2) NULL,
[PartZip] [nvarchar](5) NULL,
[PartPhone] [nvarchar](14) NULL,
[PartDOB] [datetime] NULL,
[Ethnicity] [int] NULL,
[AgeCategory] [varchar](10) NULL,
[CourtCountyID] [int] NULL,
[ClassTime] [nvarchar](50) NULL,
[Counselor] [int] NULL,
[Gender] [nvarchar](1) NULL,
[ClassDay] [int] NULL,
[PartEmail] [nvarchar](50) NULL,
[ClassID] [int] NULL,
[PaymentScheduleID] [int] NULL,
[MInitial] [nvarchar](1) NULL,
[PartStatus] [int] NULL,
[IsIndigent] [bit] NULL,
[ProgStartDate] [datetime] NULL,
[AMPM] [int] NULL,
[ProgramID] [int] NULL,
[EdClassID] [int] NULL,
[EdComplete] [bit] NULL,
[AltClassID] [int] NULL,
[Image] [nvarchar](max) NULL,
[IsDeleted] [bit] NULL,
[IsOpen] [bit] NULL,
[OpenBy] [nvarchar](25) NULL,
[Language] [nvarchar](15) NULL,
[Communication] [varchar](15) NULL,
[PartNumber] [nvarchar](50) NULL,
[MaritalStatus] [varchar](15) NULL,
[AutoLicenseNum] [nvarchar](10) NULL,
[Occupation] [nvarchar](50) NULL,
[MonthlyIncome] [nvarchar](50) NULL,
[ChecksAccepted] [bit] NULL,
CONSTRAINT [PK_Participants] PRIMARY KEY CLUSTERED
(
[PartID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[Participants] ON
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (1, CAST(0x0000946200000000 AS DateTime), N'C7128637', N'Mendoza', N'Marcelo', N'13316 Sidana Rd.', N'Yucaipa', N'CA', N'92399', N'(909) 795-5495', CAST(0x0000404200000000 AS DateTime), 12, N'65+', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'Spanish', NULL, N'R-MMM01151945-0000001', N'', N'', N'Construction', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (2, CAST(0x0000946200000000 AS DateTime), N'B8377414', N'Morales', N'Jose', N'34987 Ave D', N'Yucaipa', N'CA', N'92399', N'(909) 790-7984', CAST(0x00005C5D00000000 AS DateTime), 12, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'H', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'Spanish', NULL, N'R-MJM09271964-0000002', N'Married', N'', N'Laborer', N'1800.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (3, CAST(0x0000946600000000 AS DateTime), N'C0092127', N'Nance', N'Patricia', N'1220 Edwards', N'Redlands', N'CA', N'92374', N'(909) 792-1748', CAST(0x00005AE900000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'2', NULL, NULL, NULL, NULL, N'J', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-NPF09211963-0000003', N'Married', N'', N'Donor Specialist', N'1600.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (4, CAST(0x0000946500000000 AS DateTime), N'A0318733', N'Phillips', N'John', N'1417 Orange St.', N'Redlands', N'CA', N'92374', N'', CAST(0x00004B4D00000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'L', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-PJM10121952-0000004', N'Divorced', N'', N'Self', N'200.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (5, CAST(0x0000946500000000 AS DateTime), N'C4578686', N'Ziemer', N'Jeff', N'1438 Raemee', N'Redlands', N'CA', N'92374', N'(909) 389-0317', CAST(0x000059D300000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'M', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-ZJM12171962-0000005', N'Single', N'', N'Woodworker', N'1000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (6, CAST(0x0000946500000000 AS DateTime), N'C6015115', N'Gaylor', N'Troy', N'618 Orchard Dr.', N'Redlands', N'CA', N'92374', N'(909) 792-1241', CAST(0x0000620E00000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'L', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-GTM09231968-0000006', N'Married', N'', N'Laborer', N'1200.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (7, CAST(0x0000946500000000 AS DateTime), N'B7036861', N'Olguin', N'Rudy', N'5960 Rogers Lane', N'San Bernardino', N'CA', N'92404', N'(909) 862-5964', CAST(0x0000722A00000000 AS DateTime), 12, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'R', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-ORM01081980-0000007', N'Single', N'', N'Manager', N'1600.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (8, CAST(0x0000946600000000 AS DateTime), N'B8017360', N'Nelson', N'Ryan', N'341 Georgia St. Suite 304', N'Vallejo', N'CA', N'94590', N'(909) 557-4037', CAST(0x00006FA900000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'J', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-NRM04071978-0000008', N'Single', N'', N'Student', N'900.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (9, CAST(0x0000946600000000 AS DateTime), N'A4072514', N'Greenwalt', N'Leon', N'20735 Rosedale Dr.', N'Riverside', N'CA', N'92508', N'(909) 656-2205', CAST(0x0000574500000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'L', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-GLM03031961-0000009', N'Divorced', N'', N'Welding Contractor', N'4000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (10, CAST(0x0000946600000000 AS DateTime), N'B8383209', N'Viramontes', N'Oscar', N'845 Smokewood St.', N'Colton', N'CA', N'92324', N'(909) 423-0123', CAST(0x00006E7700000000 AS DateTime), 16, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'Spanish', NULL, N'R-VOM06051977-0000010', N'Single', N'', N'Waiter', N'1200.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (11, CAST(0x0000946600000000 AS DateTime), N'C2146898', N'Lopez', N'Gerard', N'27128 Nona Ave', N'Highland', N'CA', N'92346', N'(626) 488-9401', CAST(0x0000573D00000000 AS DateTime), 12, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-LGM02231961-0000011', N'Married', N'', N'Construction', N'1800.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (12, CAST(0x0000946600000000 AS DateTime), N'B5608612', N'Andelkovic', N'Dale', N'5900 Robinson Ave.', N'Riverside', N'CA', N'92503', N'(909) 224-5888', CAST(0x000070C400000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-ADM01151979-0000012', N'Single', N'', N'Chiropractor', N'4000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (13, CAST(0x0000946600000000 AS DateTime), N'D27529090', N'Kramer', N'Adam', N'10742 Indepence Ct.', N'Redlands', N'CA', N'92374', N'(909) 794-9559', CAST(0x0000792500000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'M', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-KAM11291984-0000013', N'Single', N'', N'Student', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (14, CAST(0x0000946600000000 AS DateTime), N'N5405986', N'Anderson', N'Katherine', N'11315 Mountain View Dr', N'Rancho Cucamonga', N'CA', N'91730', N'(909) 466-1675', CAST(0x000054C900000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'E', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-AKM06061959-0000014', N'Divorced', N'', N'Dept Manager', N'4000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (15, CAST(0x0000946700000000 AS DateTime), N'B7177310', N'Blake', N'Joshua', N'1523 Campus Ave', N'Redlands', N'CA', N'92374', N'(909) 794-3130', CAST(0x00006EF100000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'D', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-BJM10051977-0000015', N'Divorced', N'', N'Filler', N'800.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (16, CAST(0x0000946700000000 AS DateTime), N'A0183467', N'Chavez', N'Leroy', N'9034 65th St.', N'Riverside', N'CA', N'92509', N'(714) 585-9381', CAST(0x00004ABD00000000 AS DateTime), 12, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'B', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-CLM05211952-0000016', N'Divorced', N'', N'Const. Mgr', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (17, CAST(0x0000946700000000 AS DateTime), N'C4505650', N'Burns', N'James', N'11 Tennessee St. #i-155', N'Redlands', N'CA', N'92373', N'(909) 793-7237', CAST(0x0000613700000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'F', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-BJM02211968-0000017', N'Married', N'', N'Firefighter/emt', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (18, CAST(0x0000946800000000 AS DateTime), N'C3811940', N'Williams', N'Gary', N'6121 Merito Ave', N'San Bernardino', N'CA', N'92404', N'(909) 881-5160', CAST(0x00005D2100000000 AS DateTime), 1, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'L', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-WGM04111965-0000018', N'Married', N'', N'Driver', N'2100.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (19, CAST(0x0000946900000000 AS DateTime), N'B8376568', N'Davis', N'Keith', N'1546 Cameo Drive', N'Redlands', N'CA', N'92373', N'(909) 798-4235', CAST(0x0000759E00000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'E', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-DKM06101982-0000019', N'Single', N'', N'Student', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (20, CAST(0x0000946C00000000 AS DateTime), N'B7702347', N'Kunkel', N'Elisabeth', N'1211 Viaantibes', N'Redlands', N'CA', N'92373', N'(909) 389-0626', CAST(0x00006F6300000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'2', NULL, NULL, NULL, NULL, N'C', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-KEF01271978-0000020', N'Single', N'', N'Waitress', N'1200.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (21, CAST(0x0000946C00000000 AS DateTime), N'A9687924', N'Pesh', N'Shawn', N'415 Brookside Ave Ste B', N'Redlands', N'CA', N'92373', N'(909) 335-0831', CAST(0x00006C0800000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'P', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-PSM09211975-0000021', N'Single', N'', N'Dentist Student', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (22, CAST(0x0000946C00000000 AS DateTime), N'N3733072', N'Smith', N'Darryl', N'P.o.box 742', N'Yucaipa', N'CA', N'92399', N'(909) 797-4069', CAST(0x0000527300000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'L', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-SDM10161957-0000022', N'Married', N'', N'Solid Waste', N'1500.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (23, CAST(0x0000946D00000000 AS DateTime), N'', N'Reklai', N'Paul', N'625 Kansas St #4', N'Redlands', N'CA', N'92373', N'(909) 798-0189', CAST(0x00005E7700000000 AS DateTime), 17, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-RPM03191966-0000023', N'Married', N'', N'', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (24, CAST(0x0000946D00000000 AS DateTime), N'N8952272', N'Levtz', N'Wayne', N'13634 Douglas St.', N'Yucaipa', N'CA', N'92399', N'(909) 795-4202', CAST(0x0000599800000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'M', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-LWM10191962-0000024', N'Single', N'', N'Contractor', N'4000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (25, CAST(0x0000946D00000000 AS DateTime), N'N8952272', N'Leutz', N'Wayne', N'13634 Doyglas St', N'Yucaipa', N'CA', N'92399', N'(909) 795-9202', CAST(0x0000599800000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'M', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-LWM10191962-0000025', N'Single', N'', N'Contractor', N'4000.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (26, CAST(0x0000946D00000000 AS DateTime), N'B6048184', N'Hayden', N'John', N'854a Pine Ave', N'Redlands', N'CA', N'92373', N'(909) 793-2281', CAST(0x00006D4800000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'P', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-HJM08061976-0000026', N'Single', N'', N'Food Service Mgr', N'700.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (27, CAST(0x0000946D00000000 AS DateTime), N'D1585227', N'Perez', N'Ricardo', N'32036 Live Oak Cyn Rd', N'Redlands', N'CA', N'92373', N'(909) 795-4279', CAST(0x0000771000000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'A', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-PRM06151983-0000027', N'Single', N'', N'Forklift', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (28, CAST(0x0000946D00000000 AS DateTime), N'C6851067', N'Mc Glothan', N'Stanley', N'1473 Reedy Ave', N'Highland', N'CA', N'92346', N'(909) 864-8976', CAST(0x000044B100000000 AS DateTime), 1, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'W', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-MSM02241948-0000028', N'Divorced', N'', N'', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (29, CAST(0x0000946D00000000 AS DateTime), N'A7206836', N'Rothwill', N'Charlie', N'12656 Loma Vista Ct', N'Yucaipa', N'CA', N'92399', N'(909) 794-0312', CAST(0x00006B9900000000 AS DateTime), 3, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-RCM06021975-0000029', N'Single', N'', N'Tile Setter', N'2500.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (30, CAST(0x0000946D00000000 AS DateTime), N'D417544', N'Sanchez', N'Manuel', N'11952 Adams St.', N'Yucaipa', N'CA', N'92399', N'(909) 797-7764', CAST(0x000077BA00000000 AS DateTime), 12, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'I', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-SMM12021983-0000030', N'Single', N'', N'Carpet Cleaner', N'1300.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (31, CAST(0x0000946D00000000 AS DateTime), N'D3513539', N'Benavides', N'Joesph', N'1518 Karon St', N'Redlands', N'CA', N'92374', N'(909) 748-7559', CAST(0x000079D900000000 AS DateTime), 9, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'D', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-BJM05281985-0000031', N'Single', N'', N'Student', N'0.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (32, CAST(0x0000946E00000000 AS DateTime), N'C5235810', N'Monroy', N'Guillermo', N'31816 Ave E #31', N'Yucaipa', N'CA', N'92399', N'(909) 389-6737', CAST(0x000061D700000000 AS DateTime), 12, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'R', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-MGM07301968-0000032', N'Single', N'', N'Upholstery', N'500.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (33, CAST(0x0000946700000000 AS DateTime), N'D3252853', N'Williams', N'Delon', N'32960 Mesa Dr.', N'Lake Elsinore', N'CA', N'92530', N'(909) 237-3239', CAST(0x0000737300000000 AS DateTime), 1, N'25-44', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'A', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-WDM12021980-0000033', N'Single', N'', N'Detailer', N'1500.0000', NULL)
INSERT [dbo].[Participants] ([PartID], [DateEntered], [PartDLNum], [PartLName], [PartFName], [PartAddr], [PartCity], [PartState], [PartZip], [PartPhone], [PartDOB], [Ethnicity], [AgeCategory], [CourtCountyID], [ClassTime], [Counselor], [Gender], [ClassDay], [PartEmail], [ClassID], [PaymentScheduleID], [MInitial], [PartStatus], [IsIndigent], [ProgStartDate], [AMPM], [ProgramID], [EdClassID], [EdComplete], [AltClassID], [Image], [IsDeleted], [IsOpen], [OpenBy], [Language], [Communication], [PartNumber], [MaritalStatus], [AutoLicenseNum], [Occupation], [MonthlyIncome], [ChecksAccepted]) VALUES (34, CAST(0x0000946E00000000 AS DateTime), N'N7759907', N'Worthington', N'Charles', N'26612 6th St.', N'Highland', N'CA', N'92346', N'(909) 862-7432', CAST(0x0000552E00000000 AS DateTime), 3, N'45-64', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, N'D', NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, N'English', NULL, N'R-WCM09151959-0000034', N'Married', N'', N'Wholesale Dist.', N'0.0000', NULL)
SET IDENTITY_INSERT [dbo].[Participants] OFF
/****** Object: Table [dbo].[Cases] Script Date: 07/01/2011 11:47:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Cases](
[CaseID] [int] IDENTITY(1,1) NOT NULL,
[DateofArrest] [datetime] NULL,
[DateofConviction] [datetime] NULL,
[CourtID] [int] NULL,
[CaseNumber] [nvarchar](30) NULL,
[Status] [int] NULL,
[PartID] [int] NULL,
[IsDeleted] [bit] NULL,
[CounselorID] [int] NULL,
[ProgramID] [int] NULL,
[ProgStartDate] [datetime] NULL,
[ProgramCycleEntry] [int] NULL,
[PayMonths] [decimal](18, 2) NULL,
[PayFrequency] [int] NULL,
[ProgFee] [decimal](18, 2) NULL,
[PayNotes] [varchar](max) NULL,
[ClassID] [int] NULL,
[EducationID] [int] NULL,
[P2ClassID] [int] NULL,
[BAC] [decimal](3, 2) NULL,
[CaseTypeID] [int] NULL,
[NextCourtDate] [datetime] NULL,
[FirstPayDate] [datetime] NULL,
[F2FSchedule] [nvarchar](75) NULL,
[DownPayment] [decimal](18, 2) NULL,
[IsConcurrent] [bit] NULL,
[GroupStartDate] [datetime] NULL,
[EdStartDate] [datetime] NULL,
[F2FStartDate] [datetime] NULL,
[P2StartDate] [datetime] NULL,
[CustomPayID] [int] NULL,
[ReferredTo] [int] NULL,
[PaySchedID] [int] NULL,
[IntakeDate] [datetime] NULL,
[ReferredTo2] [int] NULL,
CONSTRAINT [PK_Cases] PRIMARY KEY CLUSTERED
(
[CaseID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Cases] ON
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (1, CAST(0x0000942500000000 AS DateTime), NULL, 374, N'INM141598', 5, 1, 0, 0, 2, CAST(0x0000946200000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (2, CAST(0x0000941000000000 AS DateTime), NULL, 237, N'TSB113086', 5, 2, 0, 0, 2, CAST(0x0000946200000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (3, CAST(0x0000944000000000 AS DateTime), NULL, 236, N'TRE035168', 5, 3, 0, 0, 2, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (4, CAST(0x0000942A00000000 AS DateTime), NULL, 236, N'TRE035186', 5, 4, 0, 0, 6, CAST(0x0000946500000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(1151.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (5, CAST(0x000093A300000000 AS DateTime), NULL, 189, N'03NM09920', 5, 5, 0, 0, 4, CAST(0x0000946500000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(856.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (6, CAST(0x0000941E00000000 AS DateTime), NULL, 236, N'TRE035110', 5, 6, 0, 0, 2, CAST(0x0000946500000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (7, CAST(0x0000940500000000 AS DateTime), NULL, 375, N'', 5, 7, 0, 0, 2, CAST(0x0000946500000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (8, CAST(0x0000912800000000 AS DateTime), NULL, 375, N'', 5, 8, 0, 0, 6, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(1151.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (9, CAST(0x0000940100000000 AS DateTime), NULL, 375, N'', 5, 9, 0, 0, 2, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (10, CAST(0x0000940200000000 AS DateTime), NULL, 375, N'', 5, 10, 0, 0, 2, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (11, CAST(0x000093D800000000 AS DateTime), NULL, 230, N'TWV042063', 5, 11, 0, 0, 2, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (12, CAST(0x000093C800000000 AS DateTime), NULL, 375, N'', 5, 12, 0, 0, 2, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(126.65 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (13, CAST(0x000093E500000000 AS DateTime), NULL, 193, N'09HMO7714', 5, 13, 0, 0, 6, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(1151.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (14, CAST(0x0000942A00000000 AS DateTime), NULL, 374, N'RIM443739', 5, 14, 0, 0, 3, CAST(0x0000946600000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(659.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (15, CAST(0x0000921C00000000 AS DateTime), NULL, 374, N'RIM421141', 5, 15, 0, 0, 2, CAST(0x0000946700000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (16, CAST(0x0000940200000000 AS DateTime), NULL, 374, N'RIM444110', 5, 16, 0, 0, 2, CAST(0x0000946700000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (17, CAST(0x0000941000000000 AS DateTime), NULL, 374, N'BAM020512', 5, 17, 0, 0, 2, CAST(0x0000946700000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (18, NULL, NULL, 237, N'TSB112321', 5, 18, 0, 0, 1, CAST(0x0000946800000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(147.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(87.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (19, CAST(0x0000934200000000 AS DateTime), NULL, 375, N'', 5, 19, 0, 0, 2, CAST(0x0000946900000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (20, CAST(0x0000946300000000 AS DateTime), NULL, 375, N'', 5, 20, 0, 0, 2, CAST(0x0000946C00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (21, CAST(0x0000940F00000000 AS DateTime), NULL, 375, N'', 5, 21, 0, 0, 2, CAST(0x0000946C00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (22, CAST(0x0000851D00000000 AS DateTime), NULL, 375, N'', 5, 22, 0, 0, 6, CAST(0x0000946C00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(1151.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (23, CAST(0x0000944700000000 AS DateTime), NULL, 375, N'', 5, 23, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (24, CAST(0x0000943000000000 AS DateTime), NULL, 236, N'TRE035219', 5, 24, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 148, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (25, CAST(0x0000943000000000 AS DateTime), NULL, 236, N'TRE035219', 5, 25, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (26, CAST(0x000093FB00000000 AS DateTime), NULL, 236, N'TRE034982', 5, 26, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (27, NULL, NULL, 375, N'', 5, 27, 0, 0, 1, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(147.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(87.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (28, CAST(0x0000940700000000 AS DateTime), NULL, 374, N'RIM4443384', 5, 28, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (29, CAST(0x0000944B00000000 AS DateTime), NULL, 236, N'TRE034604', 5, 29, 0, 0, 6, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(1151.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (30, CAST(0x0000941700000000 AS DateTime), NULL, 236, N'TRE035069', 5, 30, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (31, CAST(0x0000940800000000 AS DateTime), NULL, 236, N'TRE035005', 5, 31, 0, 0, 2, CAST(0x0000946D00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (32, CAST(0x000093F400000000 AS DateTime), NULL, 237, N'TSB112526', 5, 32, 0, 0, 2, CAST(0x0000946E00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (33, CAST(0x0000941E00000000 AS DateTime), NULL, 231, N'TVI052185', 5, 33, 0, 0, 2, CAST(0x0000946700000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
INSERT [dbo].[Cases] ([CaseID], [DateofArrest], [DateofConviction], [CourtID], [CaseNumber], [Status], [PartID], [IsDeleted], [CounselorID], [ProgramID], [ProgStartDate], [ProgramCycleEntry], [PayMonths], [PayFrequency], [ProgFee], [PayNotes], [ClassID], [EducationID], [P2ClassID], [BAC], [CaseTypeID], [NextCourtDate], [FirstPayDate], [F2FSchedule], [DownPayment], [IsConcurrent], [GroupStartDate], [EdStartDate], [F2FStartDate], [P2StartDate], [CustomPayID], [ReferredTo], [PaySchedID], [IntakeDate], [ReferredTo2]) VALUES (34, CAST(0x0000943700000000 AS DateTime), NULL, 375, N'', 5, 34, 0, 0, 2, CAST(0x0000946E00000000 AS DateTime), 0, CAST(0.00 AS Decimal(18, 2)), 1, CAST(480.00 AS Decimal(18, 2)), N'', 0, 0, 0, NULL, NULL, NULL, NULL, NULL, CAST(148.00 AS Decimal(18, 2)), NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL)
SET IDENTITY_INSERT [dbo].[Cases] OFF
July 1, 2011 at 12:57 pm
That's not real data is it?
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
July 1, 2011 at 1:00 pm
I may be missing something.
Why not just replace:
and c.[Status] != 2 and c.[Status] != 3
and c.[Status] != 5 and c.[Status] != 9
and c.[Status] != 10 and c.[Status] != 11
with:
and c.[Status] = 1
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 1, 2011 at 1:01 pm
Can't you join both tables and filter by ActiveStatus = 1?
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.July 1, 2011 at 1:04 pm
WOW! you guys are so awesome and fast. No it is not real data it is just demo data that looks real, names, dob etc have been changed to protect the innocent. 😀
Actually I did figure it out right after I set up the problem for you. DOH!
Anyway you are exactly right, I don't know why I didn't see it before.
SET NOCOUNT ON;
SELECT p.PartID,
case
when MInitial is null then (PartFName + ' ' + PartLName)
when MInitial is not null then (PartFName + ' ' + MInitial + ' ' + PartLName)
end as PartFName,
case
when MInitial is null then (PartFName + ' ' + PartLName)
when MInitial is not null then (PartFName + ' ' + MInitial + ' ' + PartLName)
end AS PartName, c.[Status]
FROM Participants p
inner join Cases c on p.PartID = c.PartID
left outer join StatusCodes s on c.[Status] = s.StatusID
where PartFName <> '' and p.IsDeleted != 'true'
and s.ActiveStatus = 'True'
--and c.[Status] != 2 and c.[Status] != 3
--and c.[Status] != 5 and c.[Status] != 9
--and c.[Status] != 10 and c.[Status] != 11
July 1, 2011 at 1:06 pm
john-902052 (7/1/2011)
Actually I did figure it out right after I set up the problem for you. DOH!
Are we good or what? just by posting here you get the solution delivered by our exclusive brain-to-brain technology 🙂
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.July 1, 2011 at 1:06 pm
I am so sorry I forgot to say thank you.
So....
Thank you very much for helping.
July 1, 2011 at 1:07 pm
Exactly it was like setting up the problem linked me into the borg consciousness and I solved the problem.
July 1, 2011 at 1:11 pm
And nobody mentioned....AWESOME JOB providing details, ddl, sample data...all the things required to make it easy for everybody to help. We all say it until we are blue in the face but all too often forget to give credit when somebody does such a great job asking their question. Nicely done!!!
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 1, 2011 at 2:20 pm
Sean Lange (7/1/2011)
And nobody mentioned....AWESOME JOB providing details, ddl, sample data...all the things required to make it easy for everybody to help. We all say it until we are blue in the face but all too often forget to give credit when somebody does such a great job asking their question. Nicely done!!!
Not only do we ask for this information so we can test out a solution, in a lot of cases - putting together the sample leads the OP to the solution themselves.
I think this is generally an issue where you can't see the forest for the trees...:)
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply