Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: How to Retrive raws with max datalength in the text column


Message #1 by Urvish Panchal <urvishpanchal@y...> on Mon, 15 May 2000 10:42:10 -0700 (PDT)
I have one table having text data type with more than
one records. I mean may be one or more than one record
with same datalength. Now I want to retrive only one
such raws which is duplicate in the table with same
datalength also of it's text column 

table mytable ( col_a int,col_b text)
    col_a  col_b

     1       abcd
     1       abcd
     2       defg
     2       def
     3       x
     4       o
     5       mn
     5       mn

Total Raws : 8
Out put
    col_a  col_b
     1     abcd
     2     defg
     3     x
     4     o
     5     mn

   Total Raws : 5

I tried by checking the datalength function through
derived table base query for this. I don't want to use
any temp table I want to do the same in only one
select T-SQL query. Can it be possible ???
Please send me the reply ASAP.

Urvish


  Return to Index