case issue in sql query to generate report -


Text after "

I have a table like this:

  leave_id applicant FROM_DATE to TO_DATE type 1 position 2 / 7/2014 5/7/2014 Annual approved 2 Basudev 2/7/2014 5/7/2014 Annual approval 3 Basudeb 2/7/2014 5/7/2014 Casual approved 4 Basudev 2/7/2014 5/7 / 2014 ill approve 5 a 2/7/2014 5/7/2014 Casual Accepted 6 A 2/7/2014 5/7/2014 Sick Approved  

I would like a report like this:

  Applicant's annual casual sick one 2 4 to 6 Basudev 1 to 4  

I will query this query Using

  is a.applicant, is the case when a.type = 'annual' then (DateDiff (TO_DATE, FROM_DATE)) + 1 or 'Annual_consume' terminated as the case When a.type = 'Comfortable' (DateDiff (TO_DATE, FROM_DATE)) + 1 or ending in the form of "Casual_console", ca se when a.type = 'Ill' (DateDiff (TO_DATE, FROM_DATE) + 1 otherwise  

but it is showing data like this:

Applicant Annual Casual Ill 2 A 4 A6 Basudev 2 Basudeva 3

Please help correct this problem.

After "text" itemprop = "text">
  select a.applicant, SUM (case when a.type = 'annual Annual_consume, SUM (case is when a.type = 'Comfortable' then (DateDiff (TO_DATE, FROM_DATE) + 1 end) Casual_consume, SUM (Case of the DateDiff (TO_DATE, FROM_DATE)) +1 In the form of a.type = 'sick' (applicant's request by applicant group from FIR by Scom com as DateDiff (TO_DATE, SE-DAT)) + 1 AD, applicant  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -