| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Update entire column with new date values | 
| Date: | 2006-07-27 15:51:51 | 
| Message-ID: | 20060727155151.GA30356@webserv.wug-glas.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
am  27.07.2006, um 10:17:48 -0500 mailte Weiss, Kevin folgendes:
> I need to update the date for each file (the "date" & "filename"
> columns). However, the updated values for date are not the same for each
> file (due to when the files were last modified). I can import the new
> date values from a text file containing the date and filename. 
> 
> What sort of "UPDATE" command do I use in this case? Essentially, I'm
> trying to do something like:
> 
> UPDATE docs SET date = '{$input_date}'
>     FROM ('C:/Temp/docupdate.txt')
>     WHERE filename = '{$input_filename}';
> 
> Any help is appreciated. Thanks!
Create a new table with filename and date - column and fill this table
with your text file. Then you have 2 tables and can run normal SQL to
update your table.
HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Csaba Nagy | 2006-07-27 15:57:39 | Re: PostgreSQL and Windows 2003 DFS Replication | 
| Previous Message | Richard Huxton | 2006-07-27 15:50:20 | Re: Permissions to connect to postgres database |