Re: [SQL] Rule Error

2007-10-04 Thread A. Kretschmer
am Fri, dem 05.10.2007, um 7:16:06 +0800 mailte Hengky Lie folgendes: > Yes, it works now ! Wow, the problem is in the field name. Changed it to > lowercase solved the problem. Thank you to all ho give me this advice. > > But now I have another question regarding to this field, what command I ca

Re: [SQL] Rule Error

2007-10-04 Thread Hengky Lie
between these 2 tables (tblmasdbt and tblmasgl) ? Thank you so much. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of A. Kretschmer Sent: 04 Oktober 2007 21:00 To: pgsql-sql@postgresql.org Subject: Re: [SQL] Rule Error am Thu, dem 04.10.2007, um 19:22:32

Re: [SQL] Rule Error

2007-10-04 Thread A. Kretschmer
am Thu, dem 04.10.2007, um 19:22:32 +0800 mailte Hengky Lie folgendes: > CREATE RULE "rule1" AS ON INSERT TO "public"."tblmasdbt" > > DO (insert into tblmasgl (KODEGL,NAMAREK) VALUES (new.KODEGL, new.NAMAREK)); > > > > But I always get this error : > > > ERROR: column "kodegl" of relation

Re: [SQL] Rule Error

2007-10-04 Thread Bart Degryse
You have defined the fields KODEGL and NAMAREK as uppercased field names. In your rule you refer to an unquoted field KODEGL twice and twice to an unquoted field NAMAREK. Default behaviour of PostgreSQL for unquoted fieldnames is to lowercase them. As such these fields effectively don't exist in y

Re: [SQL] Rule Error

2007-10-04 Thread Richard Huxton
Hengky Lie wrote: I have 2 tables : tblmasdbt and tblmasgl. I want on every record insertion in tblmasdbt, that record also automatically insert into tblmasdbt. I need only 2 related field. You probably want triggers rather than rules, but anyway. CREATE RULE "rule1" AS ON INSERT TO "publi

[SQL] Rule Error

2007-10-04 Thread Hengky Lie
Dear Friends, I have problem with rule and tried several times to solve it but not yet success. Hope someone can help me. I have 2 tables : tblmasdbt and tblmasgl. I want on every record insertion in tblmasdbt, that record also automatically insert into tblmasdbt. I need only 2 relate