SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 SQL Query 'Contains'
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

baijuep
Starting Member

India
15 Posts

Posted - 08/25/2012 :  11:53:27  Show Profile  Reply with Quote
I have a database name baijuep and a table named anil and field name course.
1. i want to count how much people are qualified in 'BTECH' from field course.
2. i want to display how much people are qualified in 'BTECH' from field course

I TRIED THIS
SELECT * FROM anil WHERE CONTAINS((COURSE), '"BTECH"')

THE ERROR COMES LIKE THIS

Msg 7601, Level 16, State 2, Line 1
Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'COL_DATA' because it is not full-text indexed.

baijuep

Edited by - baijuep on 08/25/2012 11:58:41

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 08/25/2012 :  13:27:19  Show Profile  Reply with Quote
the error is obvious . CONTAINS,CONTAINSTABLE etc are full text search functions so unless you enable it you cant use them.

you can simply do like


SELECT * FROM anil WHERE COURSE LIKE '%BTECH%'


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

baijuep
Starting Member

India
15 Posts

Posted - 09/07/2012 :  21:27:40  Show Profile  Reply with Quote
thanks

baijuep
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000