May 2, 2012 at 2:52 pm
hello friends
i have task
teacheridtlnametfnameschoolidschoolname
2 john smith 152 carnegi
2 john smith 155 monroville
1 ricky johnston153 elementery
3 ricky johnston157 alleghany
1 steve ulman 151 banksville
1 steve ulman 154 school
1 steve ulman 156 pittsburgh
i get this result by this query
select t.teacherid,t.tlname,t.tfname, t.schoolid, s.schoolname from teacher t join school s on
t.schoolid = s.schoolid order by t.tlname,t.tfname
and i need result display like this
teacherid tlnametfnameschoolidsecondary_schoolID schoolname
2 john smith 152 carnegi
2 john smith 155 monroville
1 ricky johnston153 elementery
3 ricky johnston 157 alleghany
1 steve ulman 151 banksville
1 steve ulman 154 school
1 steve ulman 156 pittsburgh
so please help me
May 2, 2012 at 2:54 pm
May 2, 2012 at 2:55 pm
From what you posted, nope.
Please read the first article I reference below in my signature block. It will walk you through what we need and how to post it.
May 2, 2012 at 2:56 pm
Please elaborate your question
May 2, 2012 at 2:59 pm
see
one teacher
teacher school code
steve ulman 151
steve ulman 158
steve ulman 159
so i need to display as
teacher primary_schoolcode secondary_school code
steve ulman 151 158
159
The new field needs to have a blank or empty string for the first record and all other records have the value ‘Secondary’
thats my question
May 2, 2012 at 3:02 pm
surma.sql (5/2/2012)
seeone teacher
teacher school code
steve ulman 151
steve ulman 158
steve ulman 159
so i need to display as
teacher primary_schoolcode secondary_school code
steve ulman 151 158
159
The new field needs to have a blank or empty string for the first record and all other records have the value ‘Secondary’
thats my question
May 2, 2012 at 3:03 pm
thanks to edit my question
but please give me solution
May 2, 2012 at 3:05 pm
surma.sql (5/2/2012)
thanks to edit my questionbut please give me solution
Hey, I needed to see what is what first. Please don't get impatient. We are volunteers.
May 2, 2012 at 3:06 pm
surma.sql (5/2/2012)
thanks to edit my questionbut please give me solution
And to help us out, how about showing us what you have tried so far.
May 2, 2012 at 4:13 pm
sorry friend
i don't know how to do.
please help me
May 2, 2012 at 4:15 pm
All you need to do is cut and paste the code you have already written in an attempt to solve your problem. It would help to see what you have tried.
May 2, 2012 at 4:29 pm
this is the query
select t.tlname,t.tfname, t.schoolid, s.schoolname from teacher t join school s on
t.schoolid = s.schoolid
result
tlnametfnameschoolidschoolname
steveulman151banksville
johnsmith152carnegi
rickyjohnston153elementery
steveulman154school
johnsmith155monroville
steveulman156pittsburgh
rickyjohnston157alleghany
i need
tlnametfnameschoolidsecondary schoolname
steveulman 151 banksville
154 school
156 pittsburgh
johnsmith 152 carnegi
155 monroville
rickyjohnston 153 elementery
157 alleghany
please help me
May 2, 2012 at 4:31 pm
Did u alteast read the article me and Lynn pointed?
May 2, 2012 at 4:38 pm
surma.sql (5/2/2012)
this is the queryselect t.tlname,t.tfname, t.schoolid, s.schoolname from teacher t join school s on
t.schoolid = s.schoolid
result
tlnametfnameschoolidschoolname
steveulman151banksville
johnsmith152carnegi
rickyjohnston153elementery
steveulman154school
johnsmith155monroville
steveulman156pittsburgh
rickyjohnston157alleghany
i need
tlnametfnameschoolidsecondary schoolname
steveulman 151 banksville
154 school
156 pittsburgh
johnsmith 152 carnegi
155 monroville
rickyjohnston 153 elementery
157 alleghany
please help me
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply