15,911,306 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11398913 (Top 5 by date)
Member 11398913
23-Aug-19 18:38pm
View
thank alot for your support, i just change the ( IDs ) in code to [ IDs ] and it work now, i really apreciate your help.
Member 11398913
23-Aug-19 8:01am
View
Still not work ? if there any other way , because ther are another paramaters for Where4Crystal string for query.
Member 11398913
1-Aug-19 7:10am
View
i Appreciate your support, thank for all of you for helping...
Member 11398913
31-Jul-19 19:00pm
View
thanks alot for your support, but i have alot of data in my table i cant change the structure i will lose a daa and time to do that, i try this code and its almost work but still total not counting the total days i hope some one help by this last step.
DECLARE @DayCount int =0
DECLARE @DayCount2 int =0
DECLARE @DayCount3 int =0
DECLARE @DayCount4 int =0
DECLARE @DayCount5 int =0
DECLARE @DayCount6 int =0
DECLARE @DayCount7 int =0
DECLARE @Totsi int =0
SELECT
DutyID,Saturday,
Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,
(CASE WHEN Saturday = 'M' THEN @DayCount +1 ELSE @DayCount END) Day1,
(CASE WHEN Sunday = 'M' THEN @DayCount2 +1 ELSE @DayCount2 END) Day2,
(CASE WHEN Monday = 'M' THEN @DayCount3 +1 ELSE @DayCount3 END) Day3,
(CASE WHEN Tuesday = 'M' THEN @DayCount4 +1 ELSE @DayCount4 END) Day4,
(CASE WHEN Wednesday = 'M' THEN @DayCount5 +1 ELSE @DayCount5 END) Day5,
(CASE WHEN Thursday = 'M' THEN @DayCount6 +1 ELSE @DayCount6 END) Day6,
(CASE WHEN Friday = 'M' THEN @DayCount7 +1 ELSE @DayCount7 END) Day7,
SUM(@DayCount + @DayCount2 + @DayCount3 +
@DayCount4 + @DayCount5 + @DayCount6 + @DayCount7) Totals
FROM MATRONDutyView
Group By
DutyID,Saturday,
Sunday,Monday,Tuesday,Wednesday,Thursday,Friday
HAVING
DutyID <> 1 ;
Member 11398913
31-Jul-19 9:44am
View
Thanks ,my table structure is
DutyID , EmpName, Sat,Sun,mon,tus,wed,thu,fri
in every Field the user insert Duty type as letter 'M' for example in 3 or more days
sat 'M'
sun 'M'
mon 'M'
tus 'M'
wed 'A'
thu 'D'
fri 'A'
i want to count if Emp. has more than 3 day duty type 'M'
than show hem Else not showen.
i hope my question is clear cause my english not ok