Re: [SQL] Update and trigger

2008-06-11 Thread Medi Montaseri
Thanks...but a difference seems to be that the rule is not specific to update on a particular col but any col of a row getting updated... Thanks On Tue, Jun 10, 2008 at 10:21 PM, A. Kretschmer [EMAIL PROTECTED] wrote: am Tue, dem 10.06.2008, um 18:45:51 -0700 mailte Medi Montaseri folgendes

Re: [SQL] Conceptual Design Question

2008-06-10 Thread Medi Montaseri
Assuming common semantics for a given field then the question of breaking it to many parts is also a function of its size as related to I/O. We know that memory allocation and I/O read/writes are not granular to bytes and are rather blocks of bytes as it travels from VM (virtual memory) all the

[SQL] Update and trigger

2008-06-10 Thread Medi Montaseri
Hi, I need to increament a counter such as myTable.Counter of type integer everytime myTable.status a boolean column is updated. Can you help me complete this... create trigger counter_trigger after update on myTable.counter execute procedure 'BEGIN statement; statement; statement END' Q1- how

[SQL] Query question

2008-05-22 Thread Medi Montaseri
Hi, I can use some help with the following query please. Given a couple of tables I want to do a JOIN like operation. Except that one of the columns might be null. create table T1 ( id serial, name varchar(20) ); create table T2 ( id serial, name varchar(20) ); create table T1_T2 ( id serial,

Re: [SQL] Query question

2008-05-22 Thread Medi Montaseri
Thanks Stephan, My real DDL include a forign key reference to T2.id and since I am ok with NULL value then the left outer join indeed have solved the problem. Thanks again Medi On Thu, May 22, 2008 at 2:50 PM, Stephan Szabo [EMAIL PROTECTED] wrote: On Thu, 22 May 2008, Medi Montaseri wrote

Re: [SQL] Data layer migration from MSSQL

2008-02-21 Thread Medi Montaseri
I think the grammer should help the parser to determine what you mean when the token ORDER is seen. for example in a select statement... Syntax: SELECT expression [, ...] ... [ FROM from_item [, ...] ] [ WHERE condition ] ... [ ORDER BY expression [ ASC | DESC | USING

[SQL] accounting schema

2008-02-06 Thread Medi Montaseri
Hi, I am learning my way into Accounting and was wondering how Accounting applications are designed. perhaps you could point the way On one hand, accountants talk about a sacret equation A = L + OE (Asset = Libility + Owner Equity) and then under each categories there are one or many

Re: [SQL] accounting schema

2008-02-06 Thread Medi Montaseri
... Thanks guys...this is very very nice Medi On Feb 6, 2008 6:35 PM, Steve Midgley [EMAIL PROTECTED] wrote: At 05:09 PM 2/6/2008, [EMAIL PROTECTED] wrote: Date: Wed, 6 Feb 2008 17:08:54 -0800 From: Medi Montaseri [EMAIL PROTECTED] To: pgsql-sql@postgresql.org Subject: accounting schema Message

Re: [SQL] UTF8 encoding and non-text data types

2008-01-14 Thread Medi Montaseri
14:21:00 -0800 From: Medi Montaseri [EMAIL PROTECTED] To: pgsql-sql@postgresql.org Subject: UTF8 encoding and non-text data types Message-ID: [EMAIL PROTECTED] I understand PG supports UTF-8 encoding and I have sucessfully inserted Unicode text into columns. I was wondering about other data

Re: [SQL] UTF8 encoding and non-text data types

2008-01-14 Thread Medi Montaseri
: Medi Montaseri [EMAIL PROTECTED] To: pgsql-sql@postgresql.org Subject: UTF8 encoding and non-text data types Message-ID: [EMAIL PROTECTED] I understand PG supports UTF-8 encoding and I have sucessfully inserted Unicode text into columns. I was wondering about other data types

[SQL] UTF8 encoding and non-text data types

2008-01-12 Thread Medi Montaseri
I understand PG supports UTF-8 encoding and I have sucessfully inserted Unicode text into columns. I was wondering about other data types such as numbers, decimal, dates That is, say I have a table t1 with create table t1 { name text, cost decimal } I can insert UTF8 text datatype into this table