i have the following query that worked just fine on CF7 and SQL server 2000
<cfquery name="getColumns" datasource="ds">
SELECT Column_Name, Data_Type
WHERE Table_Name = 'Fields'
AND Table_Catalog = 'databasename'
now that have upgraded to CF 9 and SQL 2012 - this query does not work
Error Executing Database Query.
|[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'FROM'.|
Any ideas - trying to export from SQL database to an excel file - THANKS!
What happens if you change the query to SELECT * FROM COLUMNS ... ??? If that works then you might need to put brackets around those column names. They don't look exactly like SQL reserved words, but ...