Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Filtering issues on SQL Table nvarchar (255) column types

  Asked By: Tanya    Date: Nov 07    Category: Sharepoint    Views: 2314

I've got a table I created in SQL Server. Its in a separate database
from the SharePoint databases. I'd like to use a dataview to display
a filtered subset of the table data in SharePoint. However, there
seems to be a problem when trying to filter on nvarchar(255) fields.

My only options for filtering on nvarchar(255) fields in both
FrontPage via Dataviews and also MS Access through a linked ODBC table
include NULL and NOT NULL. I don't get any of the standard comparison
options like begins with, equals, etc. that I would expect. (I also
tested with Excel and found the filters work properly there using new
database query.)

We tested this with my table I created as well as a standard
SharePoint database (just to see if I had created my table improperly)
and found the same result. All other field types seem to give the
proper filter options.

When I changed the field type from nvarchar(255) to nvarchar(254), my
filter options worked properly.

Can anyone validate my findings? Think it's a bug?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Percy Beach     Answered On: Nov 07

While I didn't test it on my system, it doesn't surprise me that
nvarchar(255) doesn't work but nvarchar(254) does. I've used
nvarchar(254) as a standard for years. Excel had a limit of 255
characters for years. It usually has something to do with character(s)
that delimit the end of the line.

 
Didn't find what you were looking for? Find more on Filtering issues on SQL Table nvarchar (255) column types Or get search suggestion and latest updates.




Tagged: