Forum Discussion
buzza1234
Feb 16, 2024Copper Contributor
How to get active totals by date
Good Morning , I have a policy table with below structure. I would like to get how many active policies by day (running total may be). Create Table #Policy (PolNumber int, StartDate date, ...
buzza1234
Feb 16, 2024Copper Contributor
Can Somebody please help?
Thanks
Asita
Cheef87
Feb 16, 2024Copper Contributor
Your question is a bit confusing. Are you asking how to have the output structured in a specific way?
One thing I would suggest is to change your active column from a Varchar to a bit field, 1= True and 0 = False. So column "IsActive" with 1's and 0's. Then in your WHERE clause you can say WHERE IsActive = 1.
One thing I would suggest is to change your active column from a Varchar to a bit field, 1= True and 0 = False. So column "IsActive" with 1's and 0's. Then in your WHERE clause you can say WHERE IsActive = 1.