Re: Confused about writing this stored procedure/method. - Mailing list pgsql-sql

From Tim Landscheidt
Subject Re: Confused about writing this stored procedure/method.
Date
Msg-id m3zkiylx7n.fsf@passepartout.tim-landscheidt.de
Whole thread Raw
In response to Confused about writing this stored procedure/method.  (JavaNoobie <vivek.mv@enzentech.com>)
List pgsql-sql
(anonymous) wrote:

> [...]
> I intend pass the number of the month(say 1 for January , 2 for February
> etc>) as the parameter to this method and return a number that corresponds
> to the index of the month in the new order , say I pass 8 for August , I
> return 11 , in order to get the  index of August in he financial year
> calendar somewhat like this
> [...]

You don't need any function for that, just use "ORDER BY
Month < 4, Month".

Tim



pgsql-sql by date:

Previous
From: Samuel Gendler
Date:
Subject: Re: need magic to shuffle some numbers
Next
From: Tim Landscheidt
Date:
Subject: Re: need magic to shuffle some numbers