[SQL] dropping constraints

2001-06-07 Thread Linh Luong
and when I tried to delete from a table that it referenced above it gave the error that the table I just drop doesn't exist. Obviously because I just removed it but the constraint it still there.. Thanks -- Linh Luong ---(end of broadcast)--

[SQL] Cascade constraint gone!!!

2001-06-06 Thread Linh Luong
referenced table should have an UPDATE CASCADE. But according to the error it doesn't. Is there a way to add the ON UPDATE CASCADE back without dropping any table again? Thanks -- Linh Luong ---(end of broadcast)--- TIP 5: Have you checke

[SQL] Too many rows returning

2001-05-30 Thread Linh Luong
Hi, Does the number of rows affect how long it takes to execute a query. I have 3 UNIONS. One table has 97 rows, another has 7375 rows, and 1558; In each union there are at least one LEFT OUTER JOIN and each subselect has at least 2 JOINed tables. Something like this: select ..,..,,...,

[SQL] Using indexes

2001-05-30 Thread Linh Luong
Hi, Indexes are used to find a record faster in a table. It only seems to work if I am working with one table. eg) > create index customer_id_idx on customer(id); > select * from customer where id=1; -- This uses the index I create However, when I start to join 2 or more tables together it doe

[SQL] Seq Scan

2001-05-28 Thread Linh Luong
way I can ensure that postgres will use my indexes? Thanks again -- Linh Luong Computalog Ltd. Software Developer Phone: (780) 464-6686 (ext 325) Email: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please se

[SQL] Select for LEFT JOIN

2001-05-28 Thread Linh Luong
the join for TRR and SOC they both contain a fields name ABC. How can I rename this field in the sql statement or how can I make it so the sql statement know that they are different. Please help.. .thanks -- Linh Luong Computalog Ltd. Software Developer Phone: (780) 464-6686 (ext 325) Email

[SQL] Select help

2001-05-24 Thread Linh Luong
the join for TRR and SOC they both contain a fields name ABC. How can I rename this field in the sql statement or how can I make it so the sql statement know that they are different. Please help.. .thanks -- Linh Luong Computalog Ltd. Software Developer Phone: (780) 464-6686 (ext 325) Email