I have a JAVA method that executes the following query to SQL server database
SELECT [CHEMICAL_NAME],[CHEMI_UNIT],[PRICE],[VENDOR],[CATEGORY]FROM [RPS].[dbo].[Chemicals]where CATALOGNO = '" + catNo+"' ;";
Following are the column names of the database table
CATALOGNO, CAS_NO, CHEMICAL_NAME, CHEMI_UNIT, PRICE, VENDOR, CATEGORY,
I get the above mentioned error "com.microsoft.sqlserver.jdbc.SQLServerException: The column name CATALOGNO is not valid." The query by itself executes perfectly fine when I run it from SQL server query window.