Re: [SQL] case, new column not found

2001-06-21 Thread Tom Lane
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <[EMAIL PROTECTED]> writes: > select *,( > (CASE WHEN titulo LIKE '%Matematica%' THEN 1 ELSE 0 END) + > (CASE WHEN descripcion LIKE '%Matematica%' THEN 1 ELSE 0 END) + > (CASE WHEN incumbencia LIKE '%Matematica%' THEN 1 ELSE 0 END) ) > AS e

Re: [SQL] case, new column not found

2001-06-21 Thread Stephan Szabo
On Thu, 21 Jun 2001, [iso-8859-1] Martín Marqués wrote: > I'm trying somethings here and I get strange errors: > > select *,( > (CASE WHEN titulo LIKE '%Matematica%' THEN 1 ELSE 0 END) + > (CASE WHEN descripcion LIKE '%Matematica%' THEN 1 ELSE 0 END) + > (CASE WHEN incumbenci

RE: [SQL] Select most recent record?

2001-06-21 Thread Marc Sherman
From: Mark Hamby [mailto:[EMAIL PROTECTED]] > > Marc, > Did you ever get your problem solved to your satisfaction? > We have a very simular problem with a historical database > containing typically 5K id and updates to data every few > seconds. We tried unsuccessfully to optimize queries > such

RE: [SQL] Select most recent record?

2001-06-21 Thread Mark Hamby
Marc, Did you ever get your problem solved to your satisfaction? We have a very simular problem with a historical database containing typically 5K id and updates to data every few seconds. We tried unsuccessfully to optimize queries such as those already suggested to you. We found the best means

Re: [SQL] Correct syntex for implicit curor in for loops

2001-06-21 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: >> Is there a tentative timeline for 7.2? > With our last closeness of the real release date vs. the > first estimations, and we don't even have a proposal up to > now - well, maybe this or next year is the most precise I can > tell yo

Re: [SQL] Changing PL/pgSQL triggers

2001-06-21 Thread Roberto Mello
On Thu, Jun 21, 2001 at 01:30:39PM -0400, James Orr wrote: > Hi, > > What's the easiest way to modify or view a function written in PL/pgSQL? I've been >using pg_dump to get the original function, then dropping and creating the function >and trigger after making a change. Is there an easier w

[SQL] Changing PL/pgSQL triggers

2001-06-21 Thread James Orr
Hi,   What's the easiest way to modify or view a function written in PL/pgSQL?  I've been using pg_dump to get the original function, then dropping and creating the function and trigger after making a change.  Is there an easier way?   -James

[SQL] Correct syntex for implicit curor in for loops

2001-06-21 Thread Najm Hashmi
Hi All, Could someone  please tell me the Correct syntex for implicit curor in FOR loops Thank  you in advance. --  Najm Hashmi Tel:514-271-9791 www.mondo-live.com www.flipr.com  

Re: [SQL] Extracting date from epoche

2001-06-21 Thread Tom Lane
"Richard Huxton" <[EMAIL PROTECTED]> writes: > Tom - I thought 'epoch'::timestamp should work too - good reason, or just > One Of Those Things (tm)? It works --- it's a symbolic value, though. regression=# select 'epoch'::timestamp; ?column? -- epoch (1 row) regression=# select 'epoch

[SQL] Problem by inserting rows in a table via function

2001-06-21 Thread DI Hasenöhrl
Hello all,   I use postgresql 7.0.2 as backend, ODBC Driver 7.1.003 and MsAccess97 as frontend. Now I have the following Problem and hope, someone can help me.   I developed a function in plpgsql, which inserts rows in a table *price*. This function is called from VBA-Code and everything se