Problem with SQL Query

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mbgaski
Forum Newbie
Posts: 1
Joined: Thu Aug 21, 2008 3:34 pm

Problem with SQL Query

Post by mbgaski »

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.
Post Reply