Problem with SQL Query
Posted: Thu Aug 21, 2008 3:46 pm
This is just a quick question that I figured someone here might know the answer to.
I dabble with a decent amount of PHP and database programming but am far from an expert. Depending on the seriousness of the project I'll either use Microsoft SQL Server or MySQL (trying to switch the MySQL projects to PostgreSQL as possible though).
Anyways, I've noticed on several projects using Microsoft SQL that if I execute a query using a SELECT statement that selects a field of type ntext, the query will often fail and return an error. The same query can be executed verbatim however in SQL Server Management Studio and it produces the expected result. If I change the field type to nchar or nvarchar however, the query will the behave as expected in both environments.
Anybody have any insight as to why this is occuring?
Thanks.
I dabble with a decent amount of PHP and database programming but am far from an expert. Depending on the seriousness of the project I'll either use Microsoft SQL Server or MySQL (trying to switch the MySQL projects to PostgreSQL as possible though).
Anyways, I've noticed on several projects using Microsoft SQL that if I execute a query using a SELECT statement that selects a field of type ntext, the query will often fail and return an error. The same query can be executed verbatim however in SQL Server Management Studio and it produces the expected result. If I change the field type to nchar or nvarchar however, the query will the behave as expected in both environments.
Anybody have any insight as to why this is occuring?
Thanks.