Click here to Skip to main content
15,905,229 members
Home / Discussions / Database
   

Database

 
GeneralRe: Last value in a Table Pin
Paddy Boyd10-Oct-07 1:11
Paddy Boyd10-Oct-07 1:11 
GeneralRe: Last value in a Table Pin
BINOVAR10-Oct-07 1:09
BINOVAR10-Oct-07 1:09 
GeneralRe: Last value in a Table Pin
pmarfleet10-Oct-07 2:12
pmarfleet10-Oct-07 2:12 
QuestionQuery regarding Trigger Pin
Aavesh Agarwal9-Oct-07 23:37
Aavesh Agarwal9-Oct-07 23:37 
QuestionSwap the columns values [modified] Pin
Aavesh Agarwal9-Oct-07 22:55
Aavesh Agarwal9-Oct-07 22:55 
AnswerRe: Swap the columns values Pin
Joe9-Oct-07 23:26
Joe9-Oct-07 23:26 
GeneralRe: Swap the columns values Pin
Aavesh Agarwal9-Oct-07 23:28
Aavesh Agarwal9-Oct-07 23:28 
Questionproblem in a tipical query(plzzz help me) Pin
Arihant rathi9-Oct-07 20:57
Arihant rathi9-Oct-07 20:57 
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

AnswerRe: problem in a tipical query(plzzz help me) Pin
joemonvarghese9-Oct-07 22:32
joemonvarghese9-Oct-07 22:32 
GeneralRe: problem in a tipical query(plzzz help me) Pin
Arihant rathi10-Oct-07 0:28
Arihant rathi10-Oct-07 0:28 
GeneralRe: problem in a tipical query(plzzz help me) Pin
pmarfleet10-Oct-07 1:55
pmarfleet10-Oct-07 1:55 
GeneralRe: problem in a tipical query(plzzz help me) Pin
joemonvarghese10-Oct-07 3:46
joemonvarghese10-Oct-07 3:46 
QuestionMySQL:(urgent)Why reader.Close() hangs if a LONGBLOG field is selected? [modified] Pin
alesh_nitre9-Oct-07 20:50
alesh_nitre9-Oct-07 20:50 
QuestionColumn with Null value Pin
Mri1a9-Oct-07 20:28
Mri1a9-Oct-07 20:28 
AnswerRe: Column with Null value Pin
Mri1a9-Oct-07 20:40
Mri1a9-Oct-07 20:40 
AnswerRe: Column with Null value Pin
M LN Rao9-Oct-07 20:47
M LN Rao9-Oct-07 20:47 
AnswerRe: Column with Null value Pin
Paddy Boyd10-Oct-07 1:00
Paddy Boyd10-Oct-07 1:00 
QuestionThe maximum no. of Stored procedure in a database. Pin
Vipin.d9-Oct-07 19:54
Vipin.d9-Oct-07 19:54 
AnswerRe: The maximum no. of Stored procedure in a database. Pin
Paul Conrad3-Nov-07 7:52
professionalPaul Conrad3-Nov-07 7:52 
QuestionConcatenating Columns in query Pin
anujose9-Oct-07 19:05
anujose9-Oct-07 19:05 
AnswerRe: Concatenating Columns in query Pin
M LN Rao9-Oct-07 20:51
M LN Rao9-Oct-07 20:51 
GeneralRe: Concatenating Columns in query Pin
anujose9-Oct-07 21:28
anujose9-Oct-07 21:28 
GeneralRe: Concatenating Columns in query Pin
anujose9-Oct-07 21:44
anujose9-Oct-07 21:44 
AnswerRe: Concatenating Columns in query Pin
Joe9-Oct-07 22:51
Joe9-Oct-07 22:51 
AnswerRe: Concatenating Columns in query Pin
pmpdesign11-Oct-07 18:18
pmpdesign11-Oct-07 18:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.