Hi Randy,

If I were you I think I'd do what you want by hand <g> - it must be easier
in the long run!!

Seriously, have you tried making the sequence into 2 (or more) variables and
then concatenating them for the insert?
set var v1 = ',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'' '
set var v2 = ',"9","10","11" '
set var v0 = (.v1 + .v2)
insert ... values ... .v0

By the way, I still think that the insert command specifies parens around
the list of values - which you may be doing but are not showing below.

Regards,
Alastair.


----- Original Message ----- 
From: "randyp" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 12, 2003 8:45 AM
Subject: [RBASE-L] - Re: SQL problem


> What is truly perplexing to me is that the following syntax works from
> the numbers 1 - 8.  I tested each insert command into a table beginning
> with:
> INSERT INTO Test01 (t01,t02,t03) values 1245,'N', ',''1'' '
> which inserts the following into the table:
> 1245, 'N', '1'
>
> INSERT INTO Test01 (t01,t02,t03) values 1245,'N',',''1'',''2'' '
> ---------------------
> 1245, 'N', '1', '2'
>
> INSERT INTO Test01 (t01,t02,t03) values 1245,'N',',''1'',''2'', ''3'' '
> ------------------------
> 1245, 'N','1', '2', '3'
> and so forth until:
>
> INSERT INTO Test01 (t01,t02,t03) values 1245,'N',
> ',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'' '
>
> which results in:
> ,'1','2','3','4','5','6','7','8'
>
> This command does not work although it uses the identical pattern:
> INSERT INTO Test01 (t01,t02,t03) values 1245,'N',
> ',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'' '
>
> So the issue is more than parenthesis or double quotes.
> The syntax works until it reaches some internal limit,
> and then it will not work without additional punctuation.
>
> Randy Peterson
>
>
> Dennis McGrath wrote:
>
> > It may be the embedded paren that is being misintepreted. Try this:
> >
> > insert into AcctPriv (UserAppno,approval,Clause) values
> > ( 1245,'N',(',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9''' +
> > ')'))
> >
> > Notice I have put the parens around the list per Bill, as I agree, but
> > I have also parenthesised the problem string itself, and separated out
> > the desired parenthesis and concatenated it.
> >
> > Test this in an RBase command file to debug it completely before trying
> > to pass it off to tango.
> >
> > Dennis McGrath
> >
> > --- Bill Downall <[EMAIL PROTECTED]> wrote:
> > > On Fri, 8 Aug 2003 09:05:50 -0700, Atrix Wolfe wrote:
> > >
> > > >insert into AcctPriv (UserAppno,approval,Clause) values
> > > >1245,'N',',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'')'
> > >
> > > You still need parens around your whole list of values. The syntax
> > > for insert
> > > says it should be: INSERT INTO table (columnlist) VALUES (valuelist)
> > >
> > > insert into AcctPriv (UserAppno,approval,Clause) values
> > > ( 1245,'N',',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'')'
> > > )
> > >
> > > Bill
> > >
>

Reply via email to