Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-13 : 23:21:50
|
when i count desc column (datatype=nvarchar),no error foundbut now i change desc column(datatype=text),i've got errorhow can i count text column?? |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-13 : 23:32:16
|
What do you mean count text column? What was the error? |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-13 : 23:38:55
|
i want to count column and the datatype of this column is text.previously i set the data type of this column "nvchar".but now i change the data type "text".i've got error like that:"the types ntext,text,image data types are invalid in this sub query and aggregate expression"what's wrong? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-14 : 00:12:47
|
You cant apply COUNT() function on text,ntext,image datatypes. Why are you using text datatype? What are holding in the column as values? |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-14 : 01:15:17
|
hinow i already ok coz i use another column instead of that text columnthanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-14 : 02:34:15
|
quote: Originally posted by visakh16 You cant apply COUNT() function on text,ntext,image datatypes. Why are you using text datatype? What are holding in the column as values?
A workaround can beSELECT SUM(CASE WHEN TextCol IS NULL THEN 0 ELSE 1 END)FROM Table E 12°55'05.25"N 56°04'39.16" |
|
|
|
|
|