Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP!!! PLEASE
Rachel,
This should resolve the homework
select cnumber, snumber, (slname||', '||SUBSTR(sfname,1,1))
from student, section, instruct
where ifname = 'Todd' and ilname = 'McDaniel';
The SUBSTR(str1,num1[,num2]) function returns num1 characters of str1 starting at num2.
Chris.
rc370_at_columbia.edu wrote:
>
> Mike Morgan wrote:
> >
> > Uhh... What's the original format of the data? Are lastname and firstname
> > in different columns? together in a single column? and what's the deal with
> > course and section?
> >
> > Will I get credit on your exam for a correct answer?
> >
> > rc370_at_columbia.edu wrote in message <36B7ADF8.1D2F4DD6_at_columbia.edu>...
> > >How do you word a query to get a person's intitial for the first name?
> > >(Question is below)
> > >
> > >Show student roster (use the format <last name>, <first initial> in a
> > >single column) for each section that Todd McDaniel teaches, Identify the
> > >section using course number and section number.
> > >
> > >E-mail me please
> > >rc370_at_columbia.edu
> > >
> > >Rachel
>
> he he.... It's not an exam. it's practice for homework.
>
> The last name and first name are in the same column.
> slname sfname
>
> abreviations:
> _____________________________________________________________
> student last name student first name
> slname sfname
>
> course number course section
> cnumber csection
>
> instructer last name instructer first name
> ilname ifname
> __________________________________________________________________
>
> I'm trying to turn Rockerfella, John into Rockerfella, J.
>
> This is what I have so far: what would I have to do to make the first
> name only display the first initial.
>
> select cnumber, snumber, (slname||', '||sfname)
> from student, section, instruct
> where ifname = 'Todd' and ilname = 'McDaniel';
>
> thanks again,
> Rachel
Received on Wed Feb 03 1999 - 01:43:30 CST