| Mark Culp 2005-12-22, 8:24 pm |
| The DOW() function does not use the first_day_of_week option.
Change your query to
select datepart( weekday, '2005-12-19' )
and you will get what you expect.
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Hans Peter Oechslin wrote:
>
> ASA Version 9.0.2.3207
>
> After setting the database option first_day_of_week to 1 (Monday) I still
> get 2 for 2005-12-19
>
> select dow('2005-12-19') Result: 2
>
> Circumstances:
> I have to convert a Stored Procedure from MS SQL to ASA. In SQLServer I
> just have to use SET datefirst 1 to get the required result.
>
> Is there a solution to solve this without writing a function to correct
> that behaviour?
>
> Any help appreciated.
>
> Hans Peter Oechslin
|