I am using sql server 2005.
The filed r_resume_text datatype is text.
when i run the below query i am getting below exception.
please help me how can i solve the issue.
SELECT * FROM
(SELECT ROW_NUMBER() OVER(ORDER BY r_creation_time DESC)
AS RowNumber,
r_id as r_id,
isnull(r_resume_text,'') as r_resume_text,
isnull(replace(replace((replace(convert(varchar(8000),r_resume_text),char(13),'<br>')),char(10),'<br>'),'<br><br>','<br>'),'') as r_formatted_resume_text,
isnull(r_creation_time,convert(varchar(100),r_creation_time)) as r_creation_time,
isnull(r_updated_time,convert(varchar(100),r_updated_time)) as r_updated_time,
isnull(r_resume_name,'') as r_resume_name,
isnull(r_resume_path,'')as r_resume_path,
isnull(r_resume_newpath,'')as r_resume_newpath
FROM rr_resumes
where (CONTAINS(r_resume_text,'"c++" OR "ALBERTSON" OR "ALLENDALE" OR "ALPINE" OR "AMITYVILLE" OR "ARDSLEY" OR "ARDSLEY ON HUDSON"
OR "ARVERNE" OR "ASTORIA" OR "ATLANTIC BEACH" OR "ATLANTIC HIGHLANDS" OR "AVENEL" OR "BALDWIN" OR "BASKING RIDGE" OR "BAYONNE" OR "BAYSIDE" OR "BAYVILLE" OR"BELFORD" OR "BELLEROSE" OR "BELLEVILLE" OR "BELLMORE" OR "BERGENFIELD" OR "BERKELEY HEIGHTS" OR "BERNARDSVILLE" OR "BETHPAGE" OR "BLAUVELT" OR "BLOOMFIELD"
OR "BLOOMINGDALE" OR "BOGOTA" OR "BOONTON" OR "BOUND BROOK" OR "BREEZY POINT" OR "BRIARCLIFF MANOR" OR "BRONX" OR "BRONXVILLE" OR "BROOKLYN" OR "BUTLER" OR"CALDWELL" OR "CAMBRIA HEIGHTS" OR "CARLE PLACE" OR "CARLSTADT" OR "CARTERET" OR "CEDAR GROVE" OR "CEDAR KNOLLS" OR "CEDARHURST" OR "CHATHAM" OR "CLARK" OR"CLIFFSIDE PARK" OR "CLIFFWOOD" OR "CLIFTON" OR "CLOSTER" OR "COLLEGE POINT" OR "COLONIA" OR "COLTS NECK" OR "CONGERS" OR "CONVENT STATION" OR "CORONA" OR "CRANFORD"
OR "CRESSKILL" OR "DEMAREST" OR "DENVILLE" OR "DOBBS FERRY" OR "DUMONT" OR "DUNELLEN" OR "EAST BRUNSWICK" OR "EAST ELMHURST" OR "EAST HANOVER" OR "EAST MEADOW"
OR "EAST NORWICH" OR "EAST ORANGE" OR "EAST ROCKAWAY" OR "EAST RUTHERFORD" OR "EASTCHESTER" OR "EATONTOWN" OR "EDGEWATER" OR "EDISON" OR "ELIZABETH" OR "ELIZABETHPORT"
OR "ELMHURST" OR "ELMONT" OR "ELMSFORD" OR "ELMWOOD PARK" OR "EMERSON" OR "ENGLEWOOD" OR "ENGLEWOOD CLIFFS" OR "ESSEX FELLS" OR "FAIR HAVEN" OR "FAIR LAWN"
OR "FAIRFIELD" OR "FAIRVIEW" OR "FANWOOD" OR "FAR ROCKAWAY" OR "FARMINGDALE" OR "FLORAL PARK" OR "FLORHAM PARK" OR "FLUSHING" OR "FORDS" OR "FOREST HILLS" OR"FORT LEE" OR "FORT MONMOUTH" OR "FRANKLIN LAKES" OR "FRANKLIN SQUARE" OR "FREEPORT" OR "FRESH MEADOWS" OR "GARDEN CITY" OR "GARFIELD" OR "GARWOOD" OR "GILLETTE"
OR "GLEN COVE" OR "GLEN HEAD" OR "GLEN OAKS" OR "GLEN RIDGE" OR "GLEN ROCK" OR "GLENWOOD LANDING" OR "GREAT NECK" OR "GREEN VILLAGE" OR "GREENVALE" OR "GREENWICH"
OR "HACKENSACK" OR "HALEDON" OR "HARRINGTON PARK" OR "HARRISON" OR "HARTSDALE" OR "HASBROUCK HEIGHTS" OR "HASKELL" OR "HASTINGS ON HUDSON" OR "HAWORTH" OR "HAWTHORNE"
OR "HAZLET" OR "HEMPSTEAD" OR "HEWLETT" OR "HIBERNIA" OR "HICKSVILLE" OR "HIGHLAND PARK" OR "HIGHLANDS" OR "HILLBURN" OR "HILLSDALE" OR "HILLSIDE" OR "HO
HO KUS" OR "HOBOKEN" OR "HOLLIS" OR "HOLMDEL" OR "HOWARD BEACH" OR "INWOOD" OR "IRVINGTON" OR "ISELIN" OR "ISLAND PARK" OR "JACKSON HEIGHTS" OR "JAMAICA"
OR "JERICHO" OR "JERSEY CITY" OR "KEANSBURG" OR "KEARNY" OR "KEASBEY" OR "KENILWORTH" OR "KEW GARDENS" OR "KEYPORT" OR "LAKE HIAWATHA" OR "LARCHMONT" OR "LAWRENCE"
OR "LEONARDO" OR "LEONIA" OR "LEVITTOWN" OR "LIBERTY CORNER" OR "LINCOLN PARK" OR "LINCROFT" OR "LINDEN" OR "LITTLE FALLS" OR "LITTLE FERRY" OR "LITTLE NECK"
OR "LITTLE SILVER" OR "LIVINGSTON" OR "LOCUST VALLEY" OR "LODI" OR "LONG BEACH" OR "LONG BRANCH" OR "LONG ISLAND CITY" OR "LYNBROOK" OR "LYNDHURST" OR "LYONS"
OR "MADISON" OR "MAHWAH" OR "MALVERNE" OR "MAMARONECK" OR "MANHASSET" OR "MAPLEWOOD" OR "MARLBORO" OR "MARTINSVILLE" OR "MASPETH" OR "MASSAPEQUA" OR "MASSAPEQUA
PARK" OR "MATAWAN" OR "MAYWOOD" OR "MERRICK" OR "METUCHEN" OR "MIDDLE VILLAGE" OR "MIDDLESEX" OR "MIDDLETOWN" OR "MIDLAND PARK" OR "MILL NECK" OR "MILLBURN"
OR "MILLINGTON" OR "MILLTOWN" OR "MINEOLA" OR "MONMOUTH BEACH" OR "MONSEY" OR "MONTCLAIR" OR "MONTVALE" OR "MONTVILLE" OR "MOONACHIE" OR "MORGANVILLE" OR "MORRIS
PLAINS" OR "MORRISTOWN" OR "MOUNT FREEDOM" OR "MOUNT TABOR" OR "MOUNT VERNON" OR "MOUNTAIN LAKES" OR "MOUNTAINSIDE" OR "NANUET" OR "NAVESINK" OR "NEW BRUNSWICK"
OR "NEW CITY" OR "NEW HYDE PARK" OR "NEW MILFORD" OR "NEW PROVIDENCE" OR "NEW ROCHELLE" OR "NEW VERNON" OR "NEW YORK" OR "NEWARK" OR "NORTH ARLINGTON" OR "NORTH
BERGEN" OR "NORTH BRUNSWICK" OR "NORTHVALE" OR "NORWOOD" OR "NUTLEY" OR "NYACK" OR "OAKLAND" OR "OAKLAND GARDENS" OR "OCEANPORT" OR "OCEANSIDE" OR "OLD BETHPAGE"
OR "OLD BRIDGE" OR "OLD WESTBURY" OR "ORADELL" OR "ORANGE" OR "ORANGEBURG" OR "OYSTER BAY" OR "OZONE PARK" OR "PALISADES" OR "PALISADES PARK" OR "PARAMUS" OR"PARK RIDGE" OR "PARLIN" OR "PARSIPPANY" OR "PASSAIC" OR "PATERSON" OR "PEARL RIVER" OR "PELHAM" OR "PEQUANNOCK" OR "PERTH AMBOY" OR "PIERMONT" OR "PINE
BROOK" OR "PISCATAWAY" OR "PLAINFIELD" OR "PLAINVIEW" OR "PLEASANTVILLE" OR "POINT LOOKOUT" OR "POMPTON LAKES" OR "POMPTON PLAINS" OR "PORT CHESTER" OR "PORT MONMOUTH"
OR "PORT READING" OR "PORT WASHINGTON" OR "PURCHASE" OR "QUEENS VILLAGE" OR "RAHWAY" OR "RAMSEY" OR "RED BANK" OR "REGO PARK" OR "RICHMOND HILL" OR "RIDGEFIELD"
OR "RIDGEFIELD PARK" OR "RIDGEWOOD" OR "RIVER EDGE" OR "RIVERDALE" OR "ROCHELLE PARK" OR "ROCKAWAY" OR "ROCKAWAY PARK" OR "ROCKVILLE CENTER" OR "ROCKVILLE CENTRE" OR"ROOSEVELT" OR "ROSEDALE" OR "ROSELAND" OR "ROSELLE" OR "ROSELLE PARK" OR "ROSLYN" OR "ROSLYN HEIGHTS" OR "RUMSON" OR "RUTHERFORD" OR "RYE" OR "SADDLE
BROOK" OR "SADDLE RIVER" OR "SAINT ALBANS" OR "SAYREVILLE" OR "SCARSDALE" OR "SCOTCH PLAINS" OR "SEA CLIFF" OR "SEAFORD" OR "SECAUCUS" OR "SEWAREN" OR "SHORT
HILLS" OR "SHREWSBURY" OR "SOMERSET" OR "SOUTH AMBOY" OR "SOUTH BOUND BROOK" OR "SOUTH HACKENSACK" OR "SOUTH ORANGE" OR "SOUTH OZONE PARK" OR "SOUTH PLAINFIELD" OR "SOUTH
RICHMOND HILL" OR "SOUTH RIVER" OR "SPARKILL" OR "SPOTSWOOD" OR "SPRING VALLEY" OR "SPRINGFIELD" OR "SPRINGFIELD GARDENS" OR "STATEN ISLAND" OR "STIRLING" OR "SUFFERN"
OR "SUMMIT" OR "SUNNYSIDE" OR "SYOSSET" OR "TALLMAN" OR "TAPPAN" OR "TARRYTOWN" OR "TEANECK" OR "TENAFLY" OR "TETERBORO" OR "THORNWOOD" OR "TOTOWA"
OR "TOWACO" OR "TOWNSHIP OF WASHINGTON" OR "TUCKAHOE" OR "UNION" OR "UNION CITY" OR "UNIONDALE" OR "VALHALLA" OR "VALLEY COTTAGE" OR "VALLEY STREAM" OR "VAUXHALL"
OR "VERONA" OR "WALDWICK" OR "WALLINGTON" OR "WANAQUE" OR "WANTAGH" OR "WARREN" OR "WATCHUNG" OR "WAYNE" OR "WEEHAWKEN" OR "WEST HARRISON" OR "WEST HEMPSTEAD"
OR "WEST LONG BRANCH" OR "WEST NEW YORK" OR "WEST NYACK" OR "WEST ORANGE" OR "WESTBURY" OR "WESTFIELD" OR "WESTWOOD" OR "WHIPPANY" OR "WHITE PLAINS" OR "WHITESTONE"
OR "WICKATUNK" OR "WILLISTON PARK" OR "WOOD RIDGE" OR "WOODBRIDGE" OR "WOODBURY" OR "WOODCLIFF LAKE" OR "WOODHAVEN" OR "WOODMERE" OR "WOODSIDE" OR "WYCKOFF"
OR "YONKERS"'))
and r_creation_time > DATEADD(dd, -300, CONVERT(datetime, CONVERT(varchar, GETDATE(), 1)))
and (r_resume_text IS NOT NULL AND datalength(r_resume_text)!=0)
)
AS Temp
WHERE RowNumber BETWEEN 0 AND 50
Below is the Sql Image: