Re: [SQL] UPDATE in a specific order

2010-12-17 Thread Luiz K. Matsumura
Thanks for reply, Em 16/12/2010 17:58, Jasen Betts escreveu: I need to make update of table1 with data on table2 in the order of id of table2 that looks like EAV. is it? Err, I don´t know so much about EAV, so I think that isn´t. I´m just trying to reproduce a calc in a spreeadsheet. Ther

[SQL] UPDATE in a specific order

2010-12-16 Thread Luiz K. Matsumura
tHist" is a try to force a specific order on table2 to update table1 but this isn´t working. There are some way to do this with a UPDATE statement ? Thanks in advance, -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda. * *

Re: [SQL] Aggregate question (Sum)

2007-11-19 Thread Luiz K. Matsumura
Hi Rodrigo, thanks for reply Rodrigo De León wrote: On Nov 19, 2007 3:46 PM, Luiz K. Matsumura <[EMAIL PROTECTED]> wrote: If someone can give me some hint I will apreciate. This is more of a normalization problem. See: http://www.deeptraining.com/litwin/db

[SQL] Aggregate question (Sum)

2007-11-19 Thread Luiz K. Matsumura
= totals.dtorder GROUP BY 1,2,3,4 ORDER BY totals.dtorder I say this because it's seem a waste of effort just to sum a value that can be calculated on the same loop where postgresql will go on table order... If someone can give me some hint I will apreciate. Tanks in advance. -- Luiz K. Matsumura Pl

Re: [SQL] Cast on character columns in views

2007-09-04 Thread Luiz K. Matsumura
Luiz K. Matsumura wrote: Richard Broersma Jr wrote: --- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote: CREATE VIEW view1( id, col1, type1, type2) AS SELECT table1.id, table1.col1, CAST( table2.type1 AS CHARACTER( 3 )), NULL FROM table1 JOIN

Re: [SQL] Cast on character columns in views

2007-09-03 Thread Luiz K. Matsumura
Richard Broersma Jr wrote: --- "Luiz K. Matsumura" <[EMAIL PROTECTED]> wrote: CREATE VIEW view1( id, col1, type1, type2) AS SELECT table1.id, table1.col1, CAST( table2.type1 AS CHARACTER( 3 )), NULL FROM table1 JOIN table2 ON table2.fk_table1 = tab

[SQL] Cast on character columns in views

2007-09-03 Thread Luiz K. Matsumura
ble1 = table1.id; I'm doing a cast on a query on view1 like select type1::character(3) from view1 , but if exists a manner of do this without this cast it will much appreciated. TIA -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda. ---(end of broadcast)-

Re: [SQL] Alternative to INTERSECT

2007-08-01 Thread Luiz K. Matsumura
27; AND t.value LIKE 'jose%' INTERSECT SELECT t.id FROM test t WHERE t.field = 'lastname' AND t.value LIKE 'non%'; To return no rows at all (cause nobydy's name is "andreas joseph noname"). Your suggestion doesn't cover this case. -- AJK ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] cartesian product

2007-02-19 Thread Luiz K. Matsumura
of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda. --