We are in Agreement on this point Gerald. I would prefer Mysql to Postgresql. The problem is that the shop where I work had a major Oracle system - full of triggers and functions (Oracle $$$ - Yuck!). So the decision was made to move to Postgresql. The systems that I developed have been based upon Mysql - but management decision has been to move everything to one DB. So that's where I am at.
My current problem has been in select and grouping - two problems. On mysql I could do something like the following from my perl script: Problem 1) my $select = qq! select tablea.id, tableb.id sum(tablea.qty1), sum(tablea.qty2)....... group by tablea.id And then print "$return_rec->{'sum(tablea.qty1)'}\n"; Postgresql returns nothing with this type of statement. Doing the sql manually at the prompt produces tablea.id | tableb.id | sum | sum | with the data in the rows. So I try print "$return_rec->{'sum'}\n" and I get the first sum. How do I get to the second? Problem 2) Related to problem 1 is the group by expression - I get an error from postgresql about needing tableb.id in the group or aggregate part of the sql statment. Adding this to group by phrase works in some sql statments - however in others trying to group by the additional fields the postgresql requires produces different results. These are my main two issues which has led to my search for books. I am thinking ( could be wrong and will accept any correction ) that postgresql holds closer to the SQL standard. My rational for this thinking is based upon things like not being able to do sum on a varchar field - postgres croaks by mysql says if there is number there I will sum it. Thanks again. -----Original Message----- From: Gerald Clark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 9:14 AM To: Norris, Joseph Cc: Mysql_List (E-mail) Subject: Re: Need recommendations Advanced SQL book Let us know how your support issues are addressed when you have your first problem. Mine were never even acknowledged on the postgresql group. That was the reason I went with MySQL. I have never regretted it. Norris, Joseph wrote: >Group, > >I have to move my work from Mysql to Postgres ( political decision ) - Need >any and all recommendations for books on advanced SQL. Mysql is a holds a >lot less to the standard than >postgres - or so it seems and I need to look more at standard SQL for some >of the things that >I am doing. > >Thanks to all. > >--------------------------------------------------------------------- >Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > >To request this thread, e-mail <[EMAIL PROTECTED]> >To unsubscribe, e-mail <[EMAIL PROTECTED]> >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php