Click here to Skip to main content
15,893,381 members
Home / Discussions / Database
   

Database

 
AnswerRe: showing column data as header Pin
Simon_Whale10-May-11 23:44
Simon_Whale10-May-11 23:44 
AnswerRe: showing column data as header Pin
J4amieC10-May-11 23:59
J4amieC10-May-11 23:59 
AnswerRe: showing column data as header Pin
mhwasim11-May-11 7:53
mhwasim11-May-11 7:53 
QuestionSet variable values from queried data Pin
MAW3010-May-11 9:50
MAW3010-May-11 9:50 
AnswerRe: Set variable values from queried data Pin
David Mujica10-May-11 10:40
David Mujica10-May-11 10:40 
AnswerRe: Set variable values from queried data Pin
Simon_Whale10-May-11 11:39
Simon_Whale10-May-11 11:39 
AnswerRe: Set variable values from queried data Pin
SilimSayo11-May-11 3:13
SilimSayo11-May-11 3:13 
QuestionHow do I join for tables together? Pin
Justiin126510-May-11 9:09
Justiin126510-May-11 9:09 
Hi,

I have to join four tables together and am having trouble. My query as it stands is returning data, but it's not the data I need. I do not think I have all four tables joined together correctly. How would I join the tables properly? Thank you.

Justin

I need to join the CXADMIN.RO_FAILURE_DTL RF, CXADMIN.RO_HIST RH, saadmin.sa_repair_part@elgsad rp, and saadmin.sa_code_group_task_dtl @ELGSAD cg tables together.


Here is my query so far:


SELECT distinct RF.REPAIR_ORD, RH.RECV_UNIT, RH.RECV_SERIAL_NBR, rf.created_date,  RP.FAULT_CODE, RP.REPAIR_ACTION_CODE, cg.task_code
FROM CXADMIN.RO_FAILURE_DTL RF,  CXADMIN.RO_HIST RH, saadmin.sa_repair_part@elgsad rp, saadmin.sa_code_group_task_dtl @ELGSAD cg
WHERE RF.REPAIR_ORD = RH.REPAIR_ORD and Rp.REPAIR_ORD = cg.REPAIR_ORD
AND RF.FAILURE_CODE ='DISK'AND RH.CURR_FACILITY_ID ='23' AND RF.CREATED_DATE >'1-JUN-2010' AND RF.CREATED_DATE <  '1-dec-2010'
AND (CG.TASK_CODE ='PHMD' OR CG.TASK_CODE ='PHSN' OR CG.TASK_CODE ='CHMD' OR  CG.TASK_CODE ='CHSN')

AnswerRe: How do I join for tables together? Pin
Luc Pattyn10-May-11 9:26
sitebuilderLuc Pattyn10-May-11 9:26 
AnswerRe: How do I join for tables together? Pin
SilimSayo11-May-11 7:50
SilimSayo11-May-11 7:50 
QuestionHow do I to mass update date and time? Pin
Justiin12659-May-11 18:06
Justiin12659-May-11 18:06 
AnswerRe: How do I to mass update date and time? Pin
Blue_Boy9-May-11 20:49
Blue_Boy9-May-11 20:49 
GeneralRe: How do I to mass update date and time? Pin
Justiin126510-May-11 3:30
Justiin126510-May-11 3:30 
GeneralRe: How do I to mass update date and time? Pin
Blue_Boy10-May-11 3:59
Blue_Boy10-May-11 3:59 
AnswerRe: How do I to mass update date and time? Pin
Corporal Agarn10-May-11 2:21
professionalCorporal Agarn10-May-11 2:21 
QuestionExecution Plan Caching and Reuse Pin
PIEBALDconsult9-May-11 15:30
mvePIEBALDconsult9-May-11 15:30 
AnswerRe: Execution Plan Caching and Reuse Pin
Luc Pattyn9-May-11 15:33
sitebuilderLuc Pattyn9-May-11 15:33 
GeneralRe: Execution Plan Caching and Reuse Pin
PIEBALDconsult9-May-11 15:59
mvePIEBALDconsult9-May-11 15:59 
QuestionUpdate All records Pin
ivo758-May-11 1:50
ivo758-May-11 1:50 
AnswerRe: Update All records Pin
Luc Pattyn8-May-11 2:42
sitebuilderLuc Pattyn8-May-11 2:42 
GeneralRe: Update All records Pin
ivo758-May-11 3:11
ivo758-May-11 3:11 
AnswerRe: Update All records Pin
Luc Pattyn8-May-11 3:26
sitebuilderLuc Pattyn8-May-11 3:26 
GeneralRe: Update All records Pin
ivo758-May-11 4:48
ivo758-May-11 4:48 
Questionpossible LINQTOSQL active connections Pin
wjbjnr6-May-11 11:44
wjbjnr6-May-11 11:44 
AnswerRe: possible LINQTOSQL active connections Pin
Mycroft Holmes6-May-11 22:35
professionalMycroft Holmes6-May-11 22:35 

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.