Hi!
I am having a problem getting the length of data fields using ODBC. I am simply trying to count the number of occurrences of a specified number of characters within a column. So far I have been using:
SELECT COUNT(*) FROM mydb WHERE len({ fn CONVERT(TESTNUM, SQL_VARCHAR} )) = 5
So I am trying to cast the TESTNUM values to varchar tye, and then count the number of 5 digit numbers that occur.
When I run this, ODBC returns the error: 'function name is missing'. Does anybody know what this means? Am I using the right syntax? Or does anyone know of a better way I can get this to work?
Thanks for your help!
Adam
I am having a problem getting the length of data fields using ODBC. I am simply trying to count the number of occurrences of a specified number of characters within a column. So far I have been using:
SELECT COUNT(*) FROM mydb WHERE len({ fn CONVERT(TESTNUM, SQL_VARCHAR} )) = 5
So I am trying to cast the TESTNUM values to varchar tye, and then count the number of 5 digit numbers that occur.
When I run this, ODBC returns the error: 'function name is missing'. Does anybody know what this means? Am I using the right syntax? Or does anyone know of a better way I can get this to work?
Thanks for your help!
Adam