insert into within cfloop list
I was trying to loop aover a list and do a simple insert and I failed!!!
Have I done something wrong with my simple code below? Please help!
The column years is varchar 4
<cfset
myList="2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025">
<cfloop
list="#myList#" index="i">
<cfquery name="x" datasource="#MyDSN#"> Insert IntoTblyears (years)
value('#i#')</cfquery>
</cfloop>
The Error :
Error executing database query
[Macromedia][Sybase JDBC Driver][Sybase] Incorrect syntax near 'value'
