DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to full-text search for a prefix?

Execute the following SQL Server T-SQL script in Management Studio Query Editor to demonstrate searching for the "pre" prefix.


-- SQL full-text index - SQL full-text search
USE AdventureWorks;
GO
 
SELECT   ID = ProductDescriptionID,
         ModifyDate = convert(CHAR(10),ModifiedDate,110),
         [Desc. contains "Pre" prefix] = DESCRIPTION
FROM     Production.ProductDescription
WHERE    CONTAINS(DESCRIPTION,' "pre*" ')
ORDER BY ModifyDate;
 
GO
 
/* Partial results
 
ID          ModifyDate  Desc. contains "Pre" prefix
457         06-01-2003  ....aluminum frame, and steering that allows precision control.
633         06-01-2003  Stout design absorbs shock and offers more precise steering.
647         06-01-2003  ...er and wall-thickness required of a premium mountain frame.
892         06-01-2003  New design relieves pressure for long rides.
1214        06-01-2003  amois construction eliminates pressure points.
1605        06-01-2003  ...s à un vélo tout-terrain de premier choix. Le....

*/

 

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE