Re: Confused about writing this stored procedure/method.

From: Tim Landscheidt <tim(at)tim-landscheidt(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Confused about writing this stored procedure/method.
Date: 2011-08-24 14:07:24
Message-ID: m3zkiylx7n.fsf@passepartout.tim-landscheidt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Landscheidt 2011-08-24 14:15:50 Re: need magic to shuffle some numbers
Previous Message Samuel Gendler 2011-08-24 00:17:29 Re: need magic to shuffle some numbers