Re: [GENERAL] UPDATE cell from text file
| От | Jason C. Wells |
|---|---|
| Тема | Re: [GENERAL] UPDATE cell from text file |
| Дата | |
| Msg-id | Pine.BSF.4.10.9910241037100.48317-100000@s8-37-26.student.washington.edu обсуждение исходный текст |
| Ответ на | Re: [GENERAL] UPDATE cell from text file (Bob Kline <bkline@rksystems.com>) |
| Список | pgsql-general |
On Sat, 23 Oct 1999, Bob Kline wrote:
>Just out of curiosity, what's the drawback of a perl script here? It
>would be pretty trivial.
>
> ....
> open BAF, "$ARGV[0]" or die "Can't open $ARGV[0]: $!";
> $contents = "";
> while (read, BAF, $buf, 10240) { $contents .= $buf; }
> $sth = $dbh->prepare("UPDATE website
> SET content = ?
> WHERE filename = ?");
> $sth->execute($content, $ARGV[1]) or die $DBI::errstr;
Thank you for your reply.
The drawback of perl is that I use it so often that I have to relearn it
from scratch every time I use it. :( In fact, my perl is so weak, I cannot
read your script without opening up the book. I will make good use of your
reply.
I was hoping there was an SQL construct but I half suspected there was
not.
Thank You, | http://students.washington.edu/jcwells
Jason Wells | "Those who would trade freedom for security deserve neither
| freedom nor security." - Benjamin Franklin
В списке pgsql-general по дате отправления: