[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-17 Thread venussoftop
Hi Walter If it not a bother can we revisit this issue of Malformed String of ACTUALIZAR_TABLA_PIVOT. I start and end the CREATE PROCEDURE... a follows: SET TERM ^ ; CREATE PROCEDURE ACTUALIZAR_TABLA_PIVOT( . lcInto1; EXECUTE STATEMENT lcActualizar;

RE: [firebird-support] Re: Full Cross Tab but unknown column headers

2014-01-08 Thread Maya Opperman
By the way, google's query language has a PIVOT syntax: https://developers.google.com/chart/interactive/docs/querylanguage#Pivot Eg. select sum(salary) pivot dept Would be nice if Firebird could do the same, I understand you couldn't use it inside a stored procedure, where your columns need

[firebird-support] Re: Full Cross Tab but unknown column headers

2014-01-08 Thread Svein Erling Tysvær
By the way, google's query language has a PIVOT syntax: https://developers.google.com/chart/interactive/docs/querylanguage#Pivot Eg. select sum(salary) pivot dept Would be nice if Firebird could do the same, I understand you couldn't use it inside a stored procedure, where your columns need

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-06 Thread venussoftop
Yes, FlameRobin which I use needs the SET TERM^^ ; and SET TERM ; ^^ to make your statement work. That too has the same result now as the SP route you had suggested. I do see that we have come a full circle and have the need to provide fixed column names. But all is not lost, I think I

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-06 Thread venussoftop
Yes I had the SET TERM as I was creating the SP SET TERM ^ ; CREATE PROCEDURE ACTUALIZAR_TABLA_PIVOT( tcTablaPivot VARCHAR( 28), lcInto1; EXECUTE STATEMENT lcActualizar; END END END^ SET TERM ; ^ Yet I ran into the error. What stumps me is that

Re: [firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-04 Thread W O
Do you have the SET TERM? Greetings. Walter. On Sat, Jan 4, 2014 at 2:41 AM, venussof...@gmail.com wrote: Hi Walter Okay I upgraded to FB 2.5.2.26540. I have successfully created the SPs Parser and Crear_Tabla_Pivot but when I try to create the SP called ACTUALIZAR_TABLA_PIVOT (I

SV: [firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-04 Thread Svein Erling Tysvær
Hi Set I just upgraded to FB 2.5.2.26540 and tried the EXECUTE BLOCK again but had the same issues: Starting transaction... Preparing statement: EXECUTE BLOCK returns (Mystatement varchar(1)) AS DECLARE VARIABLE S VARCHAR(256) Error: *** IBPP::SQLException *** Context: Statement::Prepare(

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2014-01-03 Thread Venus Software Operations

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-03 Thread venussoftop
Hi Set I just upgraded to FB 2.5.2.26540 and tried the EXECUTE BLOCK again but had the same issues: Starting transaction... Preparing statement: EXECUTE BLOCK returns (Mystatement varchar(1)) AS DECLARE VARIABLE S VARCHAR(256) Error: *** IBPP::SQLException *** Context: Statement::Prepare(

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2014-01-01 Thread Roberto
I agree: more complicated, a lot. And still less dynamic and powerfull. -- Em sáb, 28 de dez de 2013 18:02 MSK Svein Erling Tysvær escreveu: Hi Bhavbhuti! Let's split this into two parts. Running EXECUTE BLOCK returns (Mystatement varchar(4096)) AS DECLARE

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-30 Thread W O
Hello Bhavbhuti Both stored procedures works fine in my tests. The last version of them you can download from: http://www.mediafire.com/view/ol58gyejul1t43a/CREAR_TABLA_PIVOT.txt http://www.mediafire.com/view/1uebv8uerc5kwpe/ACTUALIZAR_TABLA_PIVOT.txt Check the name of the view. Of course it

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-30 Thread Venus Software Operations
Thanks Walter. I updated both the SPs with the ones you provided they commited well. So I dropped the original CREAR_... SP and recopied your original with the extra IN AUTONOMOUS line added to it. But maybe my version of FireBird is wrong I get an error for the IN line and AUTONOMOUS word

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-30 Thread Venus Software Operations

[firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-30 Thread Svein Erling Tysvær
Is this a Firebird 2.5 database with dialect 3 (if the database was created with InterBase before Firebird was born, it could be dialect 1, if it is a newer database it is most likely dialect 3 unless it is explicitly set to a different dialect)? I created two tables (MACCOUNTS

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-29 Thread Venus Software Operations

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-29 Thread Venus Software Operations

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-28 Thread Venus Software Operations

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-28 Thread W O
Well, I had added 2 more articles to my blog: http://firebird21.wordpress.com/2013/12/28/creando-tablas-dentro-de-un-stored-procedure-o-de-un-trigger/ http://firebird21.wordpress.com/2013/12/28/creando-tablas-agregadas-e-insertandoles-datos/ There, I explain a way you can get that you want.

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-28 Thread W O
Another article of my blog, this one with 2 stored procedures of general use. One stored procedure create the pivot table and its Primary Key, the other insert and update data. The table or view used as input parameter can have any structure, so with just those 2 stored procedures you can create

[firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-27 Thread Svein Erling Tysvær
Hi all Merry Christmas everyone! I have had to revisit this issue. I have a simplified table Color, Amount Red, 123 Green, 234 Blue, 345 Previously, I have been advised of CTEs and CASE before wherein I was able to get the result but for it I had to assume that such and such Colors names

Re: [firebird-support] Re: Full Cross Tab but unknown column headers

2013-12-27 Thread W O
Well, it is not complicated at all, I was waiting for somebody writing a better technique but the days go on and that not happen then I show you a link to a page where the technique is described, with two examples. The page is in Spanish but you can use some translator (Google has one). And of