Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Richard Huxton
Don't forget to cc: the list Daniel Futerman wrote: What is the script trying to do (in a wider sense)? The variable is used as follows: SET @OTHER_CONCEPT_ID = (SELECT `concept_id` FROM `concept_name` where name = 'MRO' LIMIT 1); (SELECT COALESCE(f2.concept_id, @OTHER_CONCEPT_ID ) as '

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Leif B. Kristensen
On Thursday 10. July 2008, Daniel Futerman wrote: >Hi, > >Is there a quick solution to implementing user-defined variables in >PostgreSQL as they are used in MySQL? > >I have the following MySQL script which i want to implement in > Postgres (NOTE : all ` have been changed to " for Postgres use): >

Re: [GENERAL] User-Defined Variables

2008-07-10 Thread Pavel Stehule
Hello PostgreSQL doesn't support this feature. There are some techniques that you can use: http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Any_other_session_variables http://www.postgresql.org/docs/8.3/static/plperl-global.html Regards Pavel Stehule 2008/7/10 Daniel Futerman <[EMAIL PROTEC

[GENERAL] User-Defined Variables

2008-07-10 Thread Daniel Futerman
Hi, Is there a quick solution to implementing user-defined variables in PostgreSQL as they are used in MySQL? I have the following MySQL script which i want to implement in Postgres (NOTE : all ` have been changed to " for Postgres use): SET @OTHER_CONCEPT_ID = (SELECT "concept_id" FROM "concept