in most databases that i'm aware of, month() is a built in function
and as such is a reserved word.

as such, it really shouldn't have worked in CFMX 6.  be glad it worked
for as long as it did :)

if you can't change the column name, enclose it in square brackets:

SELECT [Month]
FROM [Month]
WHERE monthID = <cfqueryparam value="#getStatRecords.monthID#"
cfsqltype="cf_sql_integer" />

oh, and use cfqueryparam :)

might also want to alias the column name so as not to run into any
nasty SNAFUs later on in using the data:


SELECT [Month] AS someWordOtherThanMonth
FROM [Month]
WHERE monthID = <cfqueryparam value="#getStatRecords.monthID#"
cfsqltype="cf_sql_integer" />

On 4/5/07, sheldon turchin <[EMAIL PROTECTED]> wrote:
> Installed CF7 and get error but do not get the error in CF6.
>
> <cfquery name="GetMonths" datasource="Master">
>    SELECT Month
>    FROM Month
>    WHERE MonthID = #GetStatRecords.MonthID#
> </cfquery>
>
> Is Month reserved and cannont be used in CF7?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274623
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to