Re: [GENERAL] What are your using it for?

2000-04-19 Thread Andrew Perrin - Demography
We have a large departmental database that contains lots of historical information on students, alumni, faculty, and affiliated scholars that I'm in the process of porting away from Access. Frontend is Perl/Tk and CGI. ap - And

Re: [GENERAL] excel to postgres

2000-04-17 Thread Andrew Perrin - Demography
Sure, VB works, as would perl with DBD::ODBC module. I've been using that technique for porting a database from access to postgres, and it should work equally well with excel-based ODBC connections. Disadvantage to the original poster is that it does require a Windows machine to read the Excel f

Re: [GENERAL] Perl error: fetchrow_hashref failed

2000-04-12 Thread Andrew Perrin - Demography
I think the cleanest way to handle this is: while ($Rhash = $sth->fetchrow_hashref) { do something with %$Rhash or just refer to $Rhash->{fieldname} } The array-based version below, if I remember correctly, can fail in certain cases, including if both params are undefined. The code above succ

Re: [GENERAL] one more sql query question

2000-03-16 Thread Andrew Perrin - Demography
I believe what you want is called a "left outer join": include all records in one table (projects) and records that match it on the joined tables (all the others). Try something like this (UNTESTED): SELECT p.project_id, p.project_title, SUM(t.timespent) FROM project p, subproject s, timelog t W

Re: [GENERAL] Functions

1999-11-03 Thread Andrew Perrin - Demography
I believe it's $1, $2, etc., so it would be: > CREATE FUNCTION fn_fubar(int4) AS > 'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $1' > LANGUAGSE 'sql'; - Andrew J. Perrin - [EMAIL PROTECTED] - NT/Unix Admin/Sup