Re: [SQL] help with to_date and to_char

2004-10-19 Thread lorid
Thanks Thomas it worked great ,even when I put in the var - when_month :) Lori Thomas F.O'Connell wrote: There might be a better way, but this should do what you want. And I think that you can safely replace '05' with when_month. select to_char( to_date( '05' || '/' || to_char( current_date, 'DD

Re: [SQL] Finding duplicated values

2004-10-21 Thread lorid
Kent Anderson wrote: I have a few tables that have duplicated values from an import from a different database. I have two keys I tried to set as primary and got an error ERROR:  could not create unique index DETAIL:  Table contains duplicated values.   Is there some join I can u

Re: [SQL] 'show databases' in psql way?

2004-11-02 Thread lorid
\z will list the tables in the dbase \d tablename will list the columns in the table - Erik Wasser wrote: Hi list, how can I list the databases in a postgresish way? I know about the '-l' switch of 'psql' but is there a DBI/SQL-query way? I don't want to call an external pro

[SQL] getting back autonumber just inserted

2005-02-03 Thread lorid
I could have sworn I kept a copy of prior emails that discussed how to get back a value that was just inserted into a autonumber (or in postgresql case a sequence number) any help will be appreciated thanks Lori ---(end of broadcast)--- TIP 5: Hav