I have a table where records are identified by an Arrestno. There can be multiple records in that table with the same arrestno. there is another column (FSN). Each arrestno could have a different FSN, but there can also be multiple instances of the same FSN for each arrestno. There is a third column (counts) which needs to indicate the like number of FSN entries for each arrrestno. For instance, if Arrestno GCSOARR001038 has three entries, and two of those entries have FSN values of 948.06, then the Counts value for the rows with arrestno GCSOARR001038 and FSN 948.06 will be "2" for Counts. The third FSN value for that arrestno is 901.31. That Counts value for arrestno GCSOARR001038 and FSN 901.31 will be "1". How can i script the value to be set for COUNTS according to this formula?the ddl for that table is as follows:CREATE TABLE [dbo].[ARR_AFSS]( [BEGIN] [varchar](10) NULL, [ARRESTNO] [varchar](15) NULL, [ARRESTNOB] [varchar](15) NULL, [CHARGENUM] [int] NULL, [GOC] [varchar](1) NULL, [ACL] [varchar](1) NULL, [ACD] [varchar](1) NULL, [AON] [varchar](4) NULL, [FSN] [varchar](30) NULL, [COUNTS] [smallint] NULL, [FCICCODEV] [varchar](40) NULL, [FSDESC] [varchar](200) NULL, [ADN] [varchar](3) NULL, [DV] [bit] NULL, [HC] [bit] NULL, [UCR] [varchar](4) NULL, [NCIC] [varchar](4) NULL, [END] [varchar](10) NULL, [UCRTYPE] [int] NULL, [NIBRSTYPE] [int] NULL, [PRIORITY] [int] NULL, [CriminalGangActivity1] [int] NULL, [CriminalGangActivity2] [int] NULL, [CriminalGangActivity3] [int] NULL, [LocationType] [int] NULL, [UNIQUEKEY] [varchar](22) NOT NULL, [FS] [bit] NULL, [ORD] [bit] NULL, [ATTY_NO] [varchar](15) NULL, [COURT_NO] [varchar](25) NULL, [CITATION] [bit] NULL, [WRITATT] [bit] NULL, [DOM_VIO_INJ] [bit] NULL, [ORDER_ARR] [bit] NULL, [XMITSORTDATE] [varchar](19) NULL, [ARR_INDICATE] [int] NULL, [PC] [bit] NULL, [CAPIAS] [bit] NULL, [AC] [bit] NULL, [BW] [bit] NULL, [FW] [bit] NULL, [PW] [bit] NULL, [JUVPU] [bit] NULL, [ACTIVITY] [varchar](1) NULL, [DRUGTYPE] [varchar](1) NULL, [AMOUNT] [varchar](30) NULL, [SECTION] [varchar](15) NULL, [TRANSMITTED] [bit] NULL, [DATE_ISSUED] [datetime] NULL, [BONDAMT] [money] NULL) ON [PRIMARY]
Thank you!!