[SQL] selecting duplicate records

2003-09-21 Thread NAGAPPA
Hi I would like to know the following 1. How to select duplicate records only from a single table using a select query.   Thanks in advance Regards naveen   - Original Message - From: yogesh selukar To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Saturday, September 20,

Re: [SQL] Reg: Firing Trigger when a particular column value get changed

2003-09-21 Thread sad
On Sunday 21 September 2003 02:38, you wrote: > Thilak babu wrote: > > I have a scnerio as to fire a trigger when i update a particular column > > in a table. Please do help me out in getting thro this. > > The trigger function can use logic to exclude cases where a particular > column does not c

Re: [SQL] auto_increment

2003-09-21 Thread sad
On Saturday 20 September 2003 10:23, you wrote: > On Sat, 2003-09-20 at 06:10, Muhyiddin A.M Hayat wrote: > > How to Create auto_increment field in PostreSQL. > > Can I create them using Trigger. > > Use the SERIAL datatype. See also the functions nextval(), currval() > and setval(). I believe it

Re: [SQL] Cross joining table with itself

2003-09-21 Thread Bruno Wolff III
On Sun, Sep 21, 2003 at 14:38:23 +, Bob Hutzel <[EMAIL PROTECTED]> wrote: > I've been stumped trying to solve this problem via SQL. I have a table ID, > member1, member2, member3. In any row, any member field may have a value > or be null. I want to tally up how many times each member appears

[SQL] Cross joining table with itself

2003-09-21 Thread Bob Hutzel
I've been stumped trying to solve this problem via SQL. I have a table ID, member1, member2, member3. In any row, any member field may have a value or be null. I want to tally up how many times each member appears in the table as a whole. For example, if two entries were ('a', '', 'c') and ('b', 'c

Re: [SQL] Reg: Firing Trigger when a particular column value get changed

2003-09-21 Thread Kevin Houle
Thilak babu wrote: I have a scnerio as to fire a trigger when i update a particular column in a table. Please do help me out in getting thro this. The trigger function can use logic to exclude cases where a particular column does not change. For example: CREATE FUNCTION "column_update" () RETURNS

Re: [SQL] Simple concatenation in select query

2003-09-21 Thread yogesh selukar
Hello Everybpdy, The concatination in select query u can write the query like this.    select c.status||' this '||' is '||' the '||' status ' from course_master as c; This works fine   Regards   Yogesh Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: [SQL] Unique Constraint Based on Date Range

2003-09-21 Thread Kevin Houle
Andrew Milne wrote: ... create table rates ( effective_date AS timestamp, expiry_date AS timestamp, cost AS numeric (12,2), access_time AS integer (in minutes) ); So for a given cost, there may not be a record where the effective date of one record overlaps the expiry date of anothe