Highlighted

Muti sql statements execution issue with DB2 - iSeries

New Here ,
Mar 19, 2015

Copy link to clipboard

Copied

Hello,

I  am encountering "[SQL0104] Token ; was not valid. Valid tokens: ). " error  , when  I  execute below statement.

Using ; (semi colon) for  sql statements separation.

Please  let me know , how  to fix  it.

Thanks in advance.

<cfquery name="qInsertTo" datasource="dsn">

    <cfloop from="1" to="25" index="i">

        insert into test1(userId,firstname) values('xx#i#','fname#i#') ;

    </cfloop>

</cfquery>

PS:  I  don't want to keep  cfloop outside  cfquery.

TOPICS
Database access

Views

210

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Muti sql statements execution issue with DB2 - iSeries

New Here ,
Mar 19, 2015

Copy link to clipboard

Copied

Hello,

I  am encountering "[SQL0104] Token ; was not valid. Valid tokens: ). " error  , when  I  execute below statement.

Using ; (semi colon) for  sql statements separation.

Please  let me know , how  to fix  it.

Thanks in advance.

<cfquery name="qInsertTo" datasource="dsn">

    <cfloop from="1" to="25" index="i">

        insert into test1(userId,firstname) values('xx#i#','fname#i#') ;

    </cfloop>

</cfquery>

PS:  I  don't want to keep  cfloop outside  cfquery.

TOPICS
Database access

Views

211

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 19, 2015 0

Have something to add?

Join the conversation