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 |
|
Andy dg
Starting Member
6 Posts |
Posted - 2007-03-02 : 17:21:26
|
| I have records in a table as :Col1 Col2 Col3 Col411 15090 12 208451111 19610 12 2084511How do I query to get records where count(Col4) >1 and Col3 =12Please note that Col4 is ntext datatype.TIA,Andy |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2007-03-02 : 17:42:25
|
| When you say the count of Col4, do you mean the number of non null values in Col4? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-02 : 17:44:38
|
| select col4from table1where col3 = 12group by col4having count(*) > 1Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|