problem in a tipical query(plzzz help me)
-
hi this is ajay rathi, i am facing a very big problem, select month(Start_date) as start_Month, year(Start_date) as start_Year, sum(case when Status = 'Active' then 1 else 0 end) as Active, sum(case when Status = 'Inactive' then 1 else 0 end) as Billed from tbl_Post_Job where Company_Id_Fk = 60 and Start_date between Start_date and Exp_date group by year(Start_date), month(Start_date)order by year(Start_date), month(Start_date) in this query i want many things,first of all i want to say this is not right query i want query from you.. (1)month(Start_date) as start_Month, year(Start_date) as start_Year from this line i want month and year from Start_date to Exp_date (2)in active condition,if any company's status is active from january to april so in this condition the entry of active should be come in january to april in every month (3)group by year(Start_date), month(Start_date) in group by section same problem,i want data from Start_date to exp_date actually the main problem i m facing is this that when i need month and year together and active postion and billed position saperatlly.. actually i need this data in following form... Date | Active | Billed ------------------------------------ january,2007 | 4 | 2 feburary,2007 | 7 | 5 march,2007 | 4 | 2 april,2007 | 6 | 4 ------------------------------------ january,2007 is the start_date and april,2007 is the exp_date actualy above data january,2007 is coming in form of 1,2007 but i need this data in form of january,2007 so plz tell me how can i convert this data... plz if any one needs any clarification then plz ask me about this because i need this query immediatly.. plz try to help me as soon as posible
Ajay Rathi software engineer NOIDA(UP),INDIA
-
hi this is ajay rathi, i am facing a very big problem, select month(Start_date) as start_Month, year(Start_date) as start_Year, sum(case when Status = 'Active' then 1 else 0 end) as Active, sum(case when Status = 'Inactive' then 1 else 0 end) as Billed from tbl_Post_Job where Company_Id_Fk = 60 and Start_date between Start_date and Exp_date group by year(Start_date), month(Start_date)order by year(Start_date), month(Start_date) in this query i want many things,first of all i want to say this is not right query i want query from you.. (1)month(Start_date) as start_Month, year(Start_date) as start_Year from this line i want month and year from Start_date to Exp_date (2)in active condition,if any company's status is active from january to april so in this condition the entry of active should be come in january to april in every month (3)group by year(Start_date), month(Start_date) in group by section same problem,i want data from Start_date to exp_date actually the main problem i m facing is this that when i need month and year together and active postion and billed position saperatlly.. actually i need this data in following form... Date | Active | Billed ------------------------------------ january,2007 | 4 | 2 feburary,2007 | 7 | 5 march,2007 | 4 | 2 april,2007 | 6 | 4 ------------------------------------ january,2007 is the start_date and april,2007 is the exp_date actualy above data january,2007 is coming in form of 1,2007 but i need this data in form of january,2007 so plz tell me how can i convert this data... plz if any one needs any clarification then plz ask me about this because i need this query immediatly.. plz try to help me as soon as posible
Ajay Rathi software engineer NOIDA(UP),INDIA
hi Ajay Actually i didn't undestand your Qn... but using the below qry u will get the name of the month.. select datename(month,month(start_date)) from Regards Joe
-
hi Ajay Actually i didn't undestand your Qn... but using the below qry u will get the name of the month.. select datename(month,month(start_date)) from Regards Joe
you gave me solution of one problem "datename(month,month(start_date))" but this is giving me again and again only "january" nothing else.. so plz give me the other solution.. and wht you could not under stand in my first problem plz tell me.... i need the solution... plzzzzzzzz
Ajay Rathi software engineer NOIDA(UP),INDIA
-
you gave me solution of one problem "datename(month,month(start_date))" but this is giving me again and again only "january" nothing else.. so plz give me the other solution.. and wht you could not under stand in my first problem plz tell me.... i need the solution... plzzzzzzzz
Ajay Rathi software engineer NOIDA(UP),INDIA
-
you gave me solution of one problem "datename(month,month(start_date))" but this is giving me again and again only "january" nothing else.. so plz give me the other solution.. and wht you could not under stand in my first problem plz tell me.... i need the solution... plzzzzzzzz
Ajay Rathi software engineer NOIDA(UP),INDIA
sorry for the wrong Qry correct one is select DATENAME(month, start_date) from