Re: [GENERAL] how to return results from code block

2012-06-30 Thread Misa Simic
Hi Andrus, What is the main goal? Actually what is the reason that you need to execute, and get result in ADO.NET from code block? How I see code block feature, it is more to make easier dev & test of an procedural language function inside code block... Then when we are happy with result, actually

Re: [GENERAL] how to return results from code block

2012-06-30 Thread Adrian Klaver
On 06/30/2012 07:37 AM, David Johnston wrote: On Jun 30, 2012, at 10:18, Adrian Klaver mailto:adrian.kla...@gmail.com>> wrote: Besides what Pavel said about not returning a result there is another issue with the above. It did not specify a language. I cleaned the function up a bit: The lack

Re: [GENERAL] how to return results from code block

2012-06-30 Thread David Johnston
On Jun 30, 2012, at 10:18, Adrian Klaver wrote: > > Besides what Pavel said about not returning a result there is another issue > with the above. It did not specify a language. I cleaned the function up a > bit: > The lack of a language is not a problem since the command definition makes it

Re: [GENERAL] how to return results from code block

2012-06-30 Thread Adrian Klaver
On 06/30/2012 03:17 AM, Andrus wrote: How to return single row or results from code block executed using ADO.NET ExecuteQuery() method. I tried DO $$ declare i integer :=0; begin select i+1 as res1, i+2 as res2; END$$; but got error: ERROR: query has no destination for result data How to retur

Re: [GENERAL] how to return results from code block

2012-06-30 Thread Adrian Klaver
On 06/30/2012 03:17 AM, Andrus wrote: How to return single row or results from code block executed using ADO.NET ExecuteQuery() method. I tried DO $$ declare i integer :=0; begin select i+1 as res1, i+2 as res2; END$$; but got error: ERROR: query has no destination for result data How to retur

Re: [GENERAL] how to return results from code block

2012-06-30 Thread Pavel Stehule
Hello 2012/6/30 Andrus : > How to return single row or results from code block executed using ADO.NET > ExecuteQuery() method. > I tried > > DO $$ > declare >   i integer :=0; > > begin > select i+1 as res1, i+2 as res2; > END$$; > > but got error: > > ERROR:  query has no destination for result d

[GENERAL] how to return results from code block

2012-06-30 Thread Andrus
How to return single row or results from code block executed using ADO.NET ExecuteQuery() method. I tried DO $$ declare i integer :=0; begin select i+1 as res1, i+2 as res2; END$$; but got error: ERROR: query has no destination for result data How to return single row result from code pg