Click here to Skip to main content
15,908,834 members
Home / Discussions / Database
   

Database

 
JokeRe: SUM question [solved] Pin
Dan Mos28-Feb-10 4:20
Dan Mos28-Feb-10 4:20 
QuestionHow to write this query? Pin
Andy_L_J27-Feb-10 13:48
Andy_L_J27-Feb-10 13:48 
AnswerSolved, but... [modified] Pin
Andy_L_J27-Feb-10 14:55
Andy_L_J27-Feb-10 14:55 
GeneralRe: Solved, but... Pin
Luc Pattyn27-Feb-10 15:01
sitebuilderLuc Pattyn27-Feb-10 15:01 
GeneralRe: Solved, but... Pin
Mycroft Holmes27-Feb-10 17:16
professionalMycroft Holmes27-Feb-10 17:16 
GeneralRe: Solved, but... Pin
Mycroft Holmes27-Feb-10 17:22
professionalMycroft Holmes27-Feb-10 17:22 
GeneralRe: Solved, but... Pin
Andy_L_J27-Feb-10 17:41
Andy_L_J27-Feb-10 17:41 
AnswerRe: How to write this query? Pin
i.j.russell27-Feb-10 23:41
i.j.russell27-Feb-10 23:41 
SELECT mt.TransDate,
         SUM(CASE WHEN pc.Name IN('Hadware','Custom')
              THEN mt.Qty
              ELSE 0 END) AS 'Hardware',
         SUM(CASE WHEN pc.Name LIKE 'DS %'
              THEN mt.Qty
              ELSE 0 End) As 'DataStrip'
  From MaterialTransaction mt
    JOIN Production pr
      ON mt.Prodn_ID = pr.Prodn_ID
    JOIN WorkOrder wo
      ON pr.WO_ID = wo.WO_ID
    JOIN Product p
      ON wo.Product_ID = p.ID
    JOIN ProductCategory pc
      ON p.ProdCat_ID = pc.ID
    WHERE Date Between '11/24/2009' And '11/25/2009'
  GROUP BY mt.TransDate

GeneralRe: How to write this query? Pin
Andy_L_J28-Feb-10 0:15
Andy_L_J28-Feb-10 0:15 
QuestionAdvice for product manager Pin
treefirmy27-Feb-10 12:34
treefirmy27-Feb-10 12:34 
AnswerRe: Advice for product manager Pin
Mycroft Holmes27-Feb-10 17:27
professionalMycroft Holmes27-Feb-10 17:27 
AnswerRe: Advice for product manager Pin
i.j.russell27-Feb-10 23:48
i.j.russell27-Feb-10 23:48 
GeneralRe: Advice for product manager Pin
treefirmy28-Feb-10 4:14
treefirmy28-Feb-10 4:14 
GeneralRe: Advice for product manager Pin
i.j.russell28-Feb-10 5:33
i.j.russell28-Feb-10 5:33 
GeneralRe: Advice for product manager Pin
treefirmy28-Feb-10 5:40
treefirmy28-Feb-10 5:40 
GeneralRe: Advice for product manager Pin
i.j.russell28-Feb-10 5:58
i.j.russell28-Feb-10 5:58 
GeneralRe: Advice for product manager Pin
treefirmy28-Feb-10 6:13
treefirmy28-Feb-10 6:13 
GeneralRe: Advice for product manager Pin
i.j.russell28-Feb-10 7:08
i.j.russell28-Feb-10 7:08 
GeneralRe: Advice for product manager Pin
Mycroft Holmes28-Feb-10 10:58
professionalMycroft Holmes28-Feb-10 10:58 
GeneralRe: Advice for product manager Pin
jgrogan17-Dec-10 3:34
jgrogan17-Dec-10 3:34 
Questionquestion in regard to updating using mssql Pin
tonyonlinux26-Feb-10 18:19
tonyonlinux26-Feb-10 18:19 
AnswerRe: question in regard to updating using mssql Pin
R. Giskard Reventlov26-Feb-10 19:54
R. Giskard Reventlov26-Feb-10 19:54 
AnswerRe: question in regard to updating using mssql Pin
Mycroft Holmes26-Feb-10 23:28
professionalMycroft Holmes26-Feb-10 23:28 
Questionerror message 2754 Pin
reza assar26-Feb-10 9:44
reza assar26-Feb-10 9:44 
AnswerRe: error message 2754 Pin
Mycroft Holmes26-Feb-10 11:10
professionalMycroft Holmes26-Feb-10 11:10 

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.