[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax|Parse error on code that used to run

From: richard
Subject: Re: Syntax|Parse error on code that used to run
Date: Fri, 28 Mar 2014 06:52:30 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Mar 27, 2014 at 10:24:37PM +0100, JuanPi wrote:
> On Thu, Mar 27, 2014 at 10:19 PM, richard <address@hidden> wrote:
> > Hi All,
> >
> > This is the problem:
> >
> > octave:1>  Y = ["(","'" E00"'",];
> > parse error:
> >
> >   syntax error
> >
> >>>>  Y = ["(","'" E00"'",];
> >                        ^
> What is the expected value of the second entry of Y?
The complete data entry for one row of the table is as follows: 

  try,  pq_exec_params (conn, "drop table ematrix01;"); catch end_try_catch
pq_exec_params (conn, "create table ematrix01 (E00 varchar PRIMARY KEY,\
E01 float4,E02 float4, E03 float4, E04 float4, E05 float4,\
E06 float4,E07 float4, E08 float4, E09 float4, E10 float4,\
E11 float4,E12 float4, E13 float4, E14 float4, E15 float4,\
E16 float4,E17 float4, E18 float4, E19 float4, E20 float4,\
E21 float4,E22 float4, E23 float4, E24 float4, E25 float4,\
E26 float4,E27 float4, E28 float4, E29 float4, E30 float4,\
E31 float4,E32 float4, E33 float4, E34 float4, E35 float4,\
E36 float4,E37 float4, E38 float4, E39 float4, E40 float4,\
E41 float4,E42 float4, E43 float4, E44 float4, E45 float4,\
E46 float4,E47 float4, E48 float4, E49 float4, E50 float4,\
E51 float4,E52 float4, E53 float4, E54 float4, E55 float4,\
E56 float4,E57 float4, E58 float4, E59 float4, E60 float4\

X = "insert into Ematrix01 (E00";  
XX = ", E01, E02, E03, E04, E05, E06, E07, E08, E09, E10";
X = cstrcat(X, XX);
XX = ", E11, E12, E13, E14, E15, E16, E17, E18, E19, E20";
X = cstrcat(X, XX);
XX = ", E21, E22, E23, E24, E25, E26, E27, E28, E29, E30";
X = cstrcat(X, XX);
XX = ", E31, E32, E33, E34, E35, E36, E37, E38, E39, E40";
X = cstrcat(X, XX);
XX = ", E41, E42, E43, E44, E45, E46, E47, E48, E49, E50";
X = cstrcat(X, XX);
XX = ", E51, E52, E53, E54, E55, E56, E57, E58, E59, E60";
X = cstrcat(X, XX);
XX=") values";
X = cstrcat(X, XX);

Y = ["(","'" E00"'",];
j=0; while (j< 52) 
 a1= num2str(E(1,j+1));
 a2= num2str(E(1,j+2));
 a3= num2str(E(1,j+3));
 a4= num2str(E(1,j+4));
 a5= num2str(E(1,j+5));
 a6= num2str(E(1,j+6));
 a7= num2str(E(1,j+7));
 a8= num2str(E(1,j+8));
 a9= num2str(E(1,j+9));
 a10= num2str(E(1,j+10));
YY = ["," a1,", ", a2,", " a3, ", ", a4, ", ", a5, ", ", a6,", ", a7,", " a8, 
", ", a9, ", ", a10, ];
Y = cstrcat(Y, YY);
YY= [");"];
Y = cstrcat(Y, YY);
Z = cstrcat(X, Y);
pq_exec_params (conn, Z);


Richard A Lough

reply via email to

[Prev in Thread] Current Thread [Next in Thread]