MichaelF81
Programmer
I have a query
p
and What I need is to add 1 thing, but how is a problem.
There is a field called dbo.SubSection.Level that is always 0, EXCEPT when dbo.SubSection.SectionID = 1. I need to add a line of code that sets dbo.SubSection.Level = 0 unless dbo.SubSection.SectionID = 1.
Ideas?
"Adults are just obsolete children and the hell with them." - Dr. Seuss
p
Code:
SELECT TOP 100 PERCENT dbo.Section.sectionID, dbo.SubSection.SubSectionID, dbo.Qustn.QustnOrder, dbo.Qustn.QustnText, dbo.Qustn.QustnType, dbo.Section.sectionDesc, dbo.SubSection.SubSectionText, dbo.TargetSection.targetId
FROM dbo.SubSection INNER JOIN dbo.Qustn ON dbo.Qustn.SubSectionId = dbo.SubSection.SubSectionID INNER JOIN dbo.Section ON dbo.SubSection.SectionID = dbo.Section.sectionID INNER JOIN dbo.TargetSection ON dbo.Section.sectionID = dbo.TargetSection.sectionID
WHERE dbo.TargetSection.targetId = '121'
ORDER BY dbo.SubSection.SubSectionID, dbo.Qustn.QustnOrder
and What I need is to add 1 thing, but how is a problem.
There is a field called dbo.SubSection.Level that is always 0, EXCEPT when dbo.SubSection.SectionID = 1. I need to add a line of code that sets dbo.SubSection.Level = 0 unless dbo.SubSection.SectionID = 1.
Ideas?
"Adults are just obsolete children and the hell with them." - Dr. Seuss