So i change the properties of Month to Integer in tblNews?

 Create another table called MonthNames? Now I'm lost a bit, please can you
 clarify?

 I can populate the MonthNames table with jan feb march etc....

 Please can you clarify the next bit, I not familar with n JOIN .... ON n
Month?


> ----- Original Message -----
> From: Gabriel <[EMAIL PROTECTED]>
> To: Peter Sampson <[EMAIL PROTECTED]>
> Sent: Wednesday, May 15, 2002 8:32 PM
> Subject: Re: Simple SQL
>
>
> > Change the way you do your months.  Instead of entering each month, you
> > could do it this way:
> >
> > Change tblNews.Month to an integer, and add this table:
> >
> > CREATE TABLE MonthNames ( month int not null primary key, month_name
> > char(32) );
> >
> > Populate the MonthNames table, and then your query could become this:
> >
> > SELECT DISTINCT mn.month_name FROM tblNews n JOIN MonthNames
> > ON n.Month = mn.month ORDER BY mn.Month ;
> >
> > Or something like that.
> >
> > Enjoy,
> > Gabriel.
> >
> >
> > Peter Sampson wrote:
> > > SQL beginner using Macromedia Ultradev. Can you help?
> > >
> > > Please be gentle I'm not  a programmer!
> > >
> > > I am using
> > >
> > > Select DISTINCT Month
> > > FROM tblNews
> > >
> > > The problem is that the months are shown alphabetical not in calendar
> order.
> > >
> > > How can I change this?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Before posting, please check:
> > >    http://www.mysql.com/manual.php   (the manual)
> > >    http://lists.mysql.com/           (the list archive)
> > >
> > > To request this thread, e-mail <[EMAIL PROTECTED]>
> > > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > >
> > >
> > >
> >
> >
> > --
> > Gabriel Cain
> > Unix Systems Administrator           [EMAIL PROTECTED]
> > Dialup USA, Inc.                      888-460-2286 ext 208
> >
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to