Re: [SQL] Complex Query - Data from 3 tables simultaneously

2005-10-28 Thread Muralidharan Ramakrishnan
SELECT A.SID , A.RECDATE , B.MID , B.MBDATE , C.ISSDATE FROM TableA A LEFT OUTER JOIN TableB B ON   A.SID = B.SIDLEFT OUTER JOIN TableC C ON B.MID = C.MIDORDER BY A.SID[EMAIL PROTECTED] wrote: All,   Using Postgres 8.0 on Windows Server 2003 - 16GB Ram, 3Ghz X 2 Xeons Accessing through JDBC / J

Re: [SQL] Problem -Postgre sql

2005-10-19 Thread Muralidharan Ramakrishnan
COALESCE( , )   Vikas J <[EMAIL PROTECTED]> wrote: Hi I want to know substitute function for sql server ISNULL() function in postgre   Regards,Vikas Jadhav Codec Communication Pvt. Ltd.Swargate, Pune.Ph: 020-2422 1460/70 (Ext 37)Email: [EMAIL PROTECTED] Yahoo! India Matrimony: Find your pa

Re: [SQL] copy table

2005-10-14 Thread Muralidharan Ramakrishnan
INSERT INTO MYSCHEMA2.TABLENAME SELECT * FROM MYSCHEMA1.TABLENAME WHERE < CONDITION >Shavonne Marietta Wijesinghe <[EMAIL PROTECTED]> wrote: Hello   How can i copy a table from one schema to another..   Example..   * I have a database "mydatabase" * then i have 2 schemas "myschema1" and "

Re: [SQL] UPDATE Trigger on multiple tables

2005-10-13 Thread Muralidharan Ramakrishnan
Hi     CREATE TRIGGER associates trigger function on a table and it is not possible to give more than one table seperated by comas.     CREATE TRIGGER emp_cust_stamp BEFORE INSERT OR UPDATE ON  customersFOR EACH ROW EXECUTE PROCEDURE last_updated_stamp(); CREATE TRIGGER emp_cust_stamp BEFORE INSER

Re: [SQL] question re. count, group by, and having

2005-10-11 Thread Muralidharan Ramakrishnan
Hi     Logically HAVING is executed after the GROUP BY and it must contain only the columns in the GROUP BY or aggregated function.   select state, count(state) as c from t group by state having c > 5   The above query grouped only on state and HAVING can be used only with the column state or the