15,902,112 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 rohith kallingal (Top 5 by date)
rohith kallingal
13-Jul-15 5:43am
View
yaa i tried it also.. but i think the issue is current week dates are included in lastmonth dates.how can i write current week condition in separate case?
rohith kallingal
13-Jul-15 1:21am
View
sql = "with t as\
( SELECT cwd_group_par.id as project\
, cwd_group_par.group_name as project_name\
, case \
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(lastmonth_firstdate) + "' AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(lastmonth_lastdate) + "' then 'LASTMONTH_COUNT'\
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(currentweek_startdate) + "'AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(currentweek_enddate) + "' then 'CURRENTWEEK_COUNT'\
\
end as tm\
, count(distinct i.id) cnt\
from jira.jiraissue i\
join jira.cwd_membership cwd_mem on i.assignee = cwd_mem.lower_child_name\
join jira.cwd_group cwd_group_par on cwd_group_par.lower_group_name = cwd_mem.lower_parent_name\
join jira.issuestatus on i.issuestatus = jira.issuestatus.id\
JOIN jira.PROJECT ON i.PROJECT = jira.PROJECT.ID \
join jira.changegroup chgroup on i.id = chgroup.issueid\
join jira.changeitem chitem on chgroup.id = chitem.groupid \
where cwd_group_par.id in("+str(group_details)+"\
)\
and issuestatus in (6 \
)\
AND jira.PROJECT.PKEY = 'ISD'\
AND chitem.field = 'status' and to_char(chitem.newstring) in ('Closed')\
\
group by cwd_group_par.id, cwd_group_par.group_name\
, case \
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(lastmonth_firstdate) + "' AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(lastmonth_lastdate) + "' then 'LASTMONTH_COUNT'\
when TO_CHAR(chgroup.created,'YYYY-MM-DD') >= '" + str(currentweek_startdate) + "'AND TO_CHAR(chgroup.created,'YYYY-MM-DD') <= '" + str(currentweek_enddate) + "' then 'CURRENTWEEK_COUNT'\
\
end \
)\
select * from t\
pivot\
( sum(cnt) as wk\
for tm in ('LASTMONTH_COUNT','CURRENTWEEK_COUNT')\
)\
order by 1;"
rohith kallingal
9-Jul-15 7:36am
View
now i am updated the query. is it ok?
if you have dbvisualizer tool you can run the query there.
rohith kallingal
10-Apr-15 3:45am
View
I need to change data in one directory that need to dynamically populate another directory with this data.
rohith kallingal
10-Apr-15 3:43am
View
Deleted
I need to change data in one directory that will dynamically populate another directory with this data.