Re: [SQL] Calculate next event date based on instance of the day of week

2010-12-02 Thread Jayadevan M
Hello, > I have a table which stores an event date. The event is stored as a > standard mm/dd/yy entry. > > I then need to calculate based on the dd value, WHICH day of the > week that is (e.g. Wednesday) and which occurrence of that day of > the week, within the month, it is (e.g. the THIRD We

[SQL] COPY with FORMAT in Postgresql 9.x

2010-12-02 Thread Humair Mohammed
Postgres 9.x provies the COPY command with new syntax with a new option called FORMAT http://www.postgresql.org/docs/current/static/sql-copy.html However when I run the following command: COPY dQstn FROM 'c:/bcp/postgres/dQstn.csv' WITH FORMAT csv; I get the following error message: ERROR: synt

[SQL] Calculate next event date based on instance of the day of week

2010-12-02 Thread Dimitri
I'm sure the subject sounds extremely confusing :) I have a table which stores an event date. The event is stored as a standard mm/dd/yy entry. I then need to calculate based on the dd value, WHICH day of the week that is (e.g. Wednesday) and which occurrence of that day of the week, within the