SQL Server 2000 - U2 Feedback

Go Back   U2 Feedback > Your Blue Room > Everything You Know Is Wrong > Everything You Know Is Wrong Archive
Click Here to Login
 
 
Thread Tools Search this Thread Display Modes
 
Old 10-05-2001, 09:01 PM   #1
Babyface
 
Join Date: Feb 2001
Posts: 17
Local Time: 12:57 AM
SQL Server 2000

This is not U2 related, but I'm in a bind, and I'm wondring if any of you folks might be able to help me.

Anybody here develop for SQL Server 2000? I'm currently doing some makeup work for my company, and I was wondering if someone could help me with a SQL Statement. I want to write a command to search a certain table for a keyword. I want to find all fields in all records from the B_Log table in which the Note field contains the word "test", so the statement I came up with is:

Select * from B_Log where Note like '%test%'

That works, but someone told me that if there are too many records, the way it's written now will slow down the query and that I should use a CONTAINS statement instead of like. However, I can't get any CONTAINS statements to work, and the guy who told me, his example doesn't even work. Any ideas?
__________________

__________________
polka king is offline  
Old 10-06-2001, 04:16 AM   #2
The Fly
 
Bonovation's Avatar
 
Join Date: Jul 2001
Location: just down the line at Zoo Station
Posts: 272
Local Time: 12:57 AM
Quote:
Originally posted by polka king:
This is not U2 related, but I'm in a bind, and I'm wondring if any of you folks might be able to help me.

Anybody here develop for SQL Server 2000? I'm currently doing some makeup work for my company, and I was wondering if someone could help me with a SQL Statement. I want to write a command to search a certain table for a keyword. I want to find all fields in all records from the B_Log table in which the Note field contains the word "test", so the statement I came up with is:

Select * from B_Log where Note like '%test%'

That works, but someone told me that if there are too many records, the way it's written now will slow down the query and that I should use a CONTAINS statement instead of like. However, I can't get any CONTAINS statements to work, and the guy who told me, his example doesn't even work. Any ideas?
I only know a little bit about SQL but I'm pretty sure the CONTAINS predicate is used for when you want to search tables with full-text indexing set up on them.

So try setting your table up with full-text indexing and try again

__________________

__________________
Bonovation is offline  
Old 10-06-2001, 09:00 AM   #3
Rock n' Roll Doggie
Band-aid
 
80sU2isBest's Avatar
 
Join Date: Nov 2000
Posts: 4,970
Local Time: 07:57 PM
Quote:
Originally posted by Bonovation:
I only know a little bit about SQL but I'm pretty sure the CONTAINS predicate is used for when you want to search tables with full-text indexing set up on them.
So try setting your table up with full-text indexing and try again
Wow, great idea. I'll try it! Thanks! Do you charge a consulting fee?

__________________
80sU2isBest is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Happy 1st Interference B'day to me- and all of those other Nov 2000 people!!!!! OzAurora Everything You Know Is Wrong Archive 9 11-01-2001 07:32 AM
Server has reached its capacity and can serve no more streams. Please try again later TheU2 Everything You Know Is Wrong Archive 27 10-10-2001 10:02 PM
happy 2000 posts foray! Quano Abidji-Achibi Everything You Know Is Wrong Archive 7 10-10-2001 01:16 AM


All times are GMT -5. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Design, images and all things inclusive copyright © Interference.com