Re: [SQL] Trigger/Sequence headache

2006-02-12 Thread Foster, Stephen
Lee Foster/ -Original Message- From: Stephan Szabo [mailto:[EMAIL PROTECTED] Sent: Sunday, February 12, 2006 5:11 PM To: Foster, Stephen Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Trigger/Sequence headache On Sun, 12 Feb 2006, Foster, Stephen wrote: > This is going to be one of those stupi

[SQL] Trigger/Sequence headache

2006-02-12 Thread Foster, Stephen
This is going to be one of those stupid problems of mine.  I have an insert trigger setup to verify that duplicate or repeating information isn’t storage in the table.  If trigger function finds the information as a duplicate it returns a NULL and the information isn’t added; that works.  T

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Thanks Michael! Guess I should have drunk more coffee before replying. I must have miss that. -Original Message- From: Michael Fuhr [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 11:22 AM To: Douglas McNaught Cc: Foster, Stephen; pgsql-general@postgresql.org; pgsql-sql

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Trying a totally different approach. Simple procedure that I'm using to use as learn opportunity in stored procedures in PostgreSQL prior to migrating a complex web site. Call it a training example if you will. Goal is to learn the correct process of working with cursors on complex queries in Pos

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
Ok, I tried it in that I'm still getting errors. Happy to do so but well is my errors? -Original Message- From: Douglas McNaught [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 10:39 AM To: Foster, Stephen Cc: 'Michael Fuhr'; pgsql-general@postgresql

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Foster, Stephen
CH NEXT FROM NewListCursor INTO fname, id; END; CLOSE NewListCursor; $BODY$ LANGUAGE 'sql' VOLATILE; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Fuhr Sent: Saturday, December 10, 2005 10:41 PM To: Foster, Stephen Cc: pgsql-gener

[SQL] Looking for information on PostgreSQL Stored Procedures

2005-12-10 Thread Foster, Stephen
This could be an old conversation for most. I've used PostgreSQL for a while but I haven't fully use the Procedure/Functions to it fullest until now. I need to migrate a MS-SQL 2000 database to PostgreSQL. I've read as much as I could find but I seem to be missing something. I did see last week

Re: [SQL] select count of distinct rows

2005-12-10 Thread Foster, Stephen
thing and should run faster. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jaime Casanova Sent: Saturday, December 10, 2005 7:13 PM To: Foster, Stephen Cc: Havasvölgyi Ottó; pgsql-sql@postgresql.org Subject: Re: [SQL] select count of distinct rows On 12

Re: [SQL] select count of distinct rows

2005-12-10 Thread Foster, Stephen
Well this should work but I tried it and it didn't. SELECT DISTINCT COUNT(*) FROM mytable; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Havasvölgyi Ottó Sent: Saturday, December 10, 2005 7:07 PM To: Jaime Casanova Cc: pgsql-sql@postgresql.org Subject: