Varchar(max) showing as text in SQL Server Management Studio -


i have 2 columns in database running on sql server 2008r2(10.50.4000) varchar(max), in sql server management studio (11.0.5343.0) show text in explorer window.

enter image description here

when run query

select distinct      j.ticketid,      j.jobnotes,     j.jobscopeofwork      sysdba.alx_job j  join      sysdba.alx_jobtype t on j.jobtypeid = t.alx_jobtypeid  join      sysdba.alx_jobstatus s on j.statusid = s.id  join      sysdba.address on j.addressid = a.addressid  left outer join      sysdba.alx_job_jobusers ju on j.ticketid = ju.ticketid       (ju.alx_userid = '12345' or j.userid = 12345) 

i error

msg 421, level 16, state 1, line 1
text data type cannot selected distinct because not comparable.

msg 421, level 16, state 1, line 1
text data type cannot selected distinct because not comparable.

the compatibility option set follows

enter image description here

if database engine running on sql server 2000, or if database compatibility level set "80" (sql server 2000), database doesn't know varchar(max) yet.

change compatibility level more recent version!


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -