Click here to Skip to main content
15,890,336 members
Home / Discussions / Database
   

Database

 
GeneralRe: Problem populating table Pin
Colin Angus Mackay5-Jan-06 20:45
Colin Angus Mackay5-Jan-06 20:45 
GeneralRe: Problem populating table Pin
TheJudeDude7-Jan-06 3:30
TheJudeDude7-Jan-06 3:30 
GeneralRe: Problem populating table Pin
Colin Angus Mackay7-Jan-06 3:42
Colin Angus Mackay7-Jan-06 3:42 
QuestionSQL query Pin
Deian5-Jan-06 4:33
Deian5-Jan-06 4:33 
AnswerRe: SQL query Pin
Colin Angus Mackay5-Jan-06 6:39
Colin Angus Mackay5-Jan-06 6:39 
GeneralRe: SQL query Pin
Deian5-Jan-06 7:32
Deian5-Jan-06 7:32 
QuestionRe: SQL query Pin
Deian6-Jan-06 5:22
Deian6-Jan-06 5:22 
QuestionJoin On Null?? Pin
tadhg885-Jan-06 3:05
tadhg885-Jan-06 3:05 
Hi i am havin a bit of trouble with the joins in this query as some of the values stored in the main table may be entered into the table as nulls so
when i try to join the another table using these values it will not work an i dont get back any rows does anyone have any ideas how to solve this problem

Thanks in advance Tim



select IsNull(p.firstName+ ' ','') + IsNull(p.MiddleName+ ' ','') + IsNull(p.LastName,'') as Name, i.Diagnosis as Injury,
SUBSTRING(CAST(i.Date as nvarchar), 0 ,12) as Date, im2.Name as Prognosis, imgoi.Name as GradOfInjury, impob.Name as PartOfBody,
imtt.Name as TissueType, imact.Name as Activity, imsur.Name as Surface, imsurcon.Name as SurfaceCondidtions, imfw.Name as Footwear,
'Recovered' = CASE WHEN i.Date IS NOT NULL and (i.DateRecovered IS NULL)
THEN 'No' ELSE 'Yes' END from injury i

join Person p on p.Id = i.PersonID
join InjuryMapping im2 on im2.ID = i.Prognosis
join InjuryMapping imgoi on imgoi.ID = i.GradeOfInjury
join InjuryMapping impob on impob.ID = i.PartOfBody
join InjuryMapping imtt on imtt.ID = i.TissueType
join InjuryMapping imact on imact.ID = i.Activity
join InjuryMapping imsur on imsur.ID = i.Surface
join InjuryMapping imsurcon on imsurcon.ID = i.SurfaceConditions
join InjuryMapping imfw on imfw.ID = i.Footwear

where (p.ID = 3 and i.ID = 87) or (p.ID = 7 and i.ID = 82)
order by p.Lastname

AnswerRe: Join On Null?? Pin
Colin Angus Mackay5-Jan-06 3:28
Colin Angus Mackay5-Jan-06 3:28 
GeneralRe: Join On Null?? Pin
tadhg885-Jan-06 4:42
tadhg885-Jan-06 4:42 
QuestionMSDE 2000 upgrade to SQL Server 2005 Developer Pin
Kevin McFarlane5-Jan-06 2:34
Kevin McFarlane5-Jan-06 2:34 
QuestionProblem with connection pooling Pin
nguyenvhn4-Jan-06 15:51
nguyenvhn4-Jan-06 15:51 
AnswerRe: Problem with connection pooling Pin
S. Akif Kamal4-Jan-06 18:21
S. Akif Kamal4-Jan-06 18:21 
GeneralRe: Problem with connection pooling Pin
nguyenvhn5-Jan-06 16:09
nguyenvhn5-Jan-06 16:09 
Questionkindly help me vb codes.. Pin
Estong Odpaga4-Jan-06 13:11
Estong Odpaga4-Jan-06 13:11 
AnswerRe: kindly help me vb codes.. Pin
ramani.r5-Jan-06 1:31
ramani.r5-Jan-06 1:31 
QuestionConnect to a CSV file Pin
gharry4-Jan-06 10:58
gharry4-Jan-06 10:58 
AnswerRe: Connect to a CSV file Pin
S Douglas4-Jan-06 19:32
professionalS Douglas4-Jan-06 19:32 
GeneralRe: Connect to a CSV file Pin
gharry4-Jan-06 23:01
gharry4-Jan-06 23:01 
GeneralRe: Connect to a CSV file Pin
S Douglas4-Jan-06 23:49
professionalS Douglas4-Jan-06 23:49 
GeneralRe: Connect to a CSV file Pin
gharry4-Jan-06 23:59
gharry4-Jan-06 23:59 
GeneralRe: Connect to a CSV file Pin
S Douglas5-Jan-06 0:02
professionalS Douglas5-Jan-06 0:02 
GeneralRe: Connect to a CSV file Pin
gharry5-Jan-06 0:09
gharry5-Jan-06 0:09 
GeneralRe: Connect to a CSV file Pin
S Douglas5-Jan-06 0:26
professionalS Douglas5-Jan-06 0:26 
Questionparameter passing Pin
ashee20004-Jan-06 7:02
ashee20004-Jan-06 7:02 

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.