[SQL] Trouble with exception

2008-06-06 Thread samantha mahindrakar
Hi Iam trying to insert records into a table..when an integrity constarint violation occurs the exception is caughtbut i dont want the whole thing to be rolled back or stopped because of one exception. The insert statement is as follows: 'INSERT INTO '||imputation_table||'

Re: [SQL] design resource

2008-06-06 Thread Steve Midgley
At 11:20 PM 6/5/2008, [EMAIL PROTECTED] wrote: Date: Thu, 5 Jun 2008 10:14:04 -0400 From: "Edward W. Rouse" <[EMAIL PROTECTED]> To: Subject: design resource Message-ID: <[EMAIL PROTECTED]> I was wondering if there were any resources that have some table designs for common problems. Since that

[SQL] crosstab functions in postgres 8.1

2008-06-06 Thread Chris Preston
Hello, I am almost a newbie to postgres and only recently found out about one of the greatest function crosstab in postgres. The problem is that I am using 8.1 and when I run the function I am getting an error relating to $libdir/tablefunc.. someone mentioned that it might be because I am usin

Re: [SQL] design resource

2008-06-06 Thread Craig Ringer
Steve Midgley wrote: However, normalizing country is generally pretty smart (as is normalizing state/admin region within countries where you do a lot of business). This can be generally handled on the front-end with a pull-down menu of choices, but you would probably be happiest enforcing thi

Re: [SQL] Trouble with exception

2008-06-06 Thread Craig Ringer
samantha mahindrakar wrote: Hi Iam trying to insert records into a table..when an integrity constarint violation occurs the exception is caughtbut i dont want the whole thing to be rolled back or stopped because of one exception. [snip] > Is there a way i can just skip the reco

Re: [SQL] crosstab functions in postgres 8.1

2008-06-06 Thread Tom Lane
"Chris Preston" <[EMAIL PROTECTED]> writes: > I am almost a newbie to postgres and only recently found out about one of > the greatest function crosstab in postgres. The problem is that I am using > 8.1 and when I run the function I am getting an error relating to > $libdir/tablefunc.. someone

[SQL] Need some magic with alternative rows

2008-06-06 Thread Andreas
Hi, I need some magic with alternative rows. I've got a table with rows relating another table. mytab (id, name, group_nr, class_nr, fk) SELECT * FROM mytab WHERE (fk = 994010) OR ((class_fk = 40) AND (fk = 0)) 994001, Tick, 1, 40, 994010 4001, Reporting, 1, 40