Click here to Skip to main content
15,885,061 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database suddenly slow Pin
Super Lloyd18-Sep-19 20:47
Super Lloyd18-Sep-19 20:47 
GeneralRe: Database suddenly slow Pin
Mycroft Holmes19-Sep-19 13:14
professionalMycroft Holmes19-Sep-19 13:14 
AnswerRe: Database suddenly slow Pin
Member 1240381729-Dec-19 23:35
Member 1240381729-Dec-19 23:35 
QuestionI need this windows odbc driver Pin
Member 1458760611-Sep-19 8:00
Member 1458760611-Sep-19 8:00 
AnswerRe: I need this windows odbc driver Pin
OriginalGriff11-Sep-19 8:01
mveOriginalGriff11-Sep-19 8:01 
GeneralRe: I need this windows odbc driver Pin
Member 1458760611-Sep-19 8:16
Member 1458760611-Sep-19 8:16 
AnswerRe: I need this windows odbc driver Pin
Maciej Los11-Sep-19 8:47
mveMaciej Los11-Sep-19 8:47 
QuestionLooking for some assistance with a query Pin
FrankLepkowski10-Sep-19 9:50
FrankLepkowski10-Sep-19 9:50 
Hello All,

I am looking for some help with the following query. The results I get back are fine as long as there is data in the ShiftData table that meets the criteria. If there is no data in the ShiftDaa table then my query returns nothing. What I am after is to return back all LoopCodes and Choppers from MapBushingData table and zeros if there are no items in ShiftData table matching the criterion. Any help is most appreciated.

SQL


SELECT MapBushingData.LoopCode,
  MapBushingData.Chopper,
  Sum(ShiftData.BRKS) AS Total_BRKS,
  Sum(ShiftData.BBOH) AS Total_BBOH,
  Avg(ShiftData.DTAB) AS Avg_DTAB
FROM ShiftData
  INNER JOIN MapBushingData ON ShiftData.[Position] = MapBushingData.LoopCode WHERE ShiftData.ShiftDate >= cast(? as date) AND ShiftData.ShiftDate <= cast(? as date)

GROUP BY MapBushingData.Chopper,MapBushingData.LoopCode


Thanks,

Frank
AnswerRe: Looking for some assistance with a query Pin
MadMyche10-Sep-19 11:12
professionalMadMyche10-Sep-19 11:12 
GeneralRe: Looking for some assistance with a query Pin
MadMyche11-Sep-19 1:56
professionalMadMyche11-Sep-19 1:56 
GeneralRe: Looking for some assistance with a query Pin
FrankLepkowski11-Sep-19 4:15
FrankLepkowski11-Sep-19 4:15 
GeneralRe: Looking for some assistance with a query Pin
MadMyche11-Sep-19 6:28
professionalMadMyche11-Sep-19 6:28 
QuestionNeed help mixing two queries in one... Pin
Joan M1-Sep-19 0:40
professionalJoan M1-Sep-19 0:40 
AnswerRe: Need help mixing two queries in one... Pin
Richard Deeming2-Sep-19 1:02
mveRichard Deeming2-Sep-19 1:02 
GeneralRe: Need help mixing two queries in one... Pin
Jörgen Andersson2-Sep-19 1:39
professionalJörgen Andersson2-Sep-19 1:39 
GeneralRe: Need help mixing two queries in one... Pin
Joan M2-Sep-19 10:24
professionalJoan M2-Sep-19 10:24 
GeneralRe: Need help mixing two queries in one... Pin
Jörgen Andersson2-Sep-19 19:27
professionalJörgen Andersson2-Sep-19 19:27 
GeneralRe: Need help mixing two queries in one... Pin
Joan M2-Sep-19 19:29
professionalJoan M2-Sep-19 19:29 
GeneralRe: Need help mixing two queries in one... Pin
Jörgen Andersson2-Sep-19 19:35
professionalJörgen Andersson2-Sep-19 19:35 
GeneralRe: Need help mixing two queries in one... Pin
Joan M2-Sep-19 10:21
professionalJoan M2-Sep-19 10:21 
GeneralRe: Need help mixing two queries in one... Pin
phil.o2-Sep-19 10:43
professionalphil.o2-Sep-19 10:43 
GeneralRe: Need help mixing two queries in one... Pin
Joan M2-Sep-19 11:24
professionalJoan M2-Sep-19 11:24 
GeneralRe: Need help mixing two queries in one... Pin
phil.o2-Sep-19 12:25
professionalphil.o2-Sep-19 12:25 
GeneralRe: Need help mixing two queries in one... Pin
Joan M2-Sep-19 18:52
professionalJoan M2-Sep-19 18:52 
GeneralRe: Need help mixing two queries in one... Pin
Mycroft Holmes3-Sep-19 12:40
professionalMycroft Holmes3-Sep-19 12:40 

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.