Available Values And Free Text

Feb 18, 2007

Hi,
I have a parameter that get his available values from a query.

I want that user will have the option to select from the values list OR to type in his own value.

Is there a way to do that?

Thanks,

View 3 Replies


ADVERTISEMENT

SQL Server/ Text Fields - Cannot Add Free Text

Sep 25, 2007

I have a data table in my project that has a "text" (not varchar) field in it.  I am trying to load this field with little paragraphs of text for showing on my pages. How do I get the free text loaded into the table?  The database explorer and all the data grid controls cut the text off at one line.  There doesn't seem to be any way to get multiline text into this table.  

View 2 Replies View Related

Best Way To Do A Free Text Search

Dec 16, 2007

Hi I have a .net 2 website that works from a sql 2000 db.  I am building a form that will allow the user to type in any search criteria and based on their input I need to produce some results (that’s the simplest way to put it)I will need to search various parts of my db to find similar sounding information, I was just wondering what is the best way to do this.  I had the following thoughts1)  Search columns using Soundex tsql function (but not sure how good this is?)2)  Remove all noise words from user input (eg, and, or, the etc...) and then use a regular expression to search the fields in the dbAlternatively are their some third party components to do can do this for me Many thanks in advance

 

View 3 Replies View Related

Free Text Search

Mar 3, 2004

does anyone have code that shows how to separate individual words from a sentence.

e.g. i have a list of questions and answers in my database and have the following query for it:

SELECT question, Answer
FROM QuestionsAnswer
WHERE FREETEXT(Question, 'i want to travel around the world and learn about cooking')

so i want to extend the above query so that takes each key word (travel, cooking, learn) to find out how frequently that particular word appears in the question (for ranking purposes).

I know freetexttable does rank results, but they don't seem accurate enough for what i need to do.


HELP!!!

View 3 Replies View Related

SQL 2000 And Free Text Search

Jul 10, 2006

I have created a stored procedure which should accepts a search friendly string to be used in a free text search. I am using
DSPerson AS FT_TBL INNER JOIN CONTAINSTABLE (DSPerson, [FiftyWords],        @FiftyWords       ,50    ) AS KEY_TBL    ON FT_TBL.PersonID = KEY_TBL.[KEY] WHERE FT_TBL.PersonID != @PersonID ORDER BY KEY_TBL.RANK DESC
Now the problem here is that the parameter @FiftyWords should be able to accept a string such as
'"Love" OR "Hate" OR "Customer Service"'
Notice the start and end of the query with single quotes and concepts should be between double quotes. Now this works OK inside SQL Query Analyzer, but try to get this right building such a string within ASP.NET and passing it as a parameter to SQL. In SQL profiler it comes out all weird with more quotes than originally built on asp side (errror obviously). Furthermore, I can't find an escape sequence that comes out right on the SQL side.
Any ideas of how to fix this??
 

View 4 Replies View Related

Address Search Via Free Text Box

Mar 18, 2008

Hello,
I have an address search on my website which is free text, so you could type in either a postcode or an address, examples would be:
"L1 3GB""Oxford Road""Oxford Road London""Oxford Road, London" - note the comma
At the moment I have a sproc (see below) which works if a user types in just a postcode, e.g. "L1 3GB" or just a street name, e.g. "Oxford Road", but if a users types in "Oxford Road London" or "Oxford Road, London" my search will return no data.
Can anyone advise how I can make my query work more effectively and work with more than just the most basic of input data?
Thanks Marco
SELECT Upper(Postcode) as 'Postcode', Upper(Address1) as 'Address1', Upper(Address2) as 'Address2', Upper(Address3) as 'Address3', Upper(Address4) as 'Address4', Upper(Address5) as 'Address5'FROM PostcodeWHERE (Address1 = @address) OR (Address2 = @address) OR (Postcode = @address)

View 5 Replies View Related

Free Text Index Performance

Apr 3, 2008

I've got a free text index on a table that is taking 15-30 % of processing becuase there is a lot of insert activity on this table at the moment.
I know the indexer backs off if the server gets busy - or so the theory goes.
Is there a way for me to tell it to take more of a back seat?

View 1 Replies View Related

Free Text Search Across Multiple Tables

Nov 30, 2006

Anyone have any recommendations on how to bring together a search across multiple tables? Like I'd love to do a search where i searched for the product name, company name or tag all in one query (though all are in separate tables)... is that possible? Individually, it's easy, but combined it's very hard.

View 3 Replies View Related

Possible To Free-text Search Two Tables At Once In One Query?

Aug 10, 2004

is it possible to use a full-text search query on two tables at the same time? for example, say i have a table of items, and another table of descriptions... would i be able to search both those tables for a string in one query? they are currently in indexed in separate catalogs, would i need to put them both in one?

thanks

View 1 Replies View Related

Free Text Search For 2 Million Records

Apr 23, 2007

Hi

I have a new client with an existing system that has just over 2 million business listings in one table. Each business listing is associated with one business category.

* Company Table (around 20 fields):

companyID
companyName
categoryID
state
postCode
etc.

* Category Table (5 fields)

categoryID
categoryName
etc.

We are using MSSQL 2005 Express Edition with Advanced Services

A free text search needs to be performed on the companyName and categoryName limited by region (state and or postcode).

1) What kind of response times should I expect for the free text search (I have not used the free text search before)

2) How should I index the companyName and categoryName so they are both used in a joined query? i.e. Do I just configure the free text search index on each field separately and it should work?

Any suggestions appreciated.

Best Regards

Kevan

View 2 Replies View Related

Unable To Populate Free Text Column

Dec 28, 2007

there is a free text column in the source
A sampe record
"








Try to login to the Operational Risk System- EDCS system (https://oprisk4-dev.ny.ssmb.com:26539/siteminderagent/forms/login.fcc?TYPE=33554433&REALMOID=06-000f3e21-1533-1105-9e71-8088cb990008&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=$SM$ZlvK8bQN3Gx6kXd9LY%2fFTznf3Vi5QSreVbn0vxHs7IUR6gJ9ncq2qnEXtM4wBS0%2fGP%2bU8qMBqC8%3d&TARGET=$SM$%2foprcs%2fjsp%2fcs%2ejsp"), but get the following after entering my id and password:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the oprisk4-dev.ny.ssmb.com:26539 home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.

HTTP 500 - Internal server error
Internet Explorer
"


The above record has to inserted into the destination but SSIS gives error.
The above is record from an excel file
while importing it directly also gives error.

Can someone help me.

View 1 Replies View Related

Index Files Created During Free Text Search

Mar 8, 2008

history.ix, index_a.ix, index_d_1.ix, index_di_1.ix, index_i_2.ix,
index_k_2.ix, index_kl_1.ix, index_klh_2.ix, index_n.ix,
index_r_l.ix, index_sv.ix, index_v.ix, index_v_ix.log, indexlog.dat.

This index files are created in my hidden folder. Now, my problem is,
1) Is this files associated with Full Text Search.
2) when the file will be created.
3) For what purpose, this files are stored.

View 4 Replies View Related

Filter Query Using Free Text Predicate Contains For One Of Column That Have Dimensions Of Items

Oct 1, 2014

I am looking to filter the query using the free text predicate Contains for one of the column that have dimensions of the items. The query is something like

Select * from sampletable
where contains(filtercolumn, 'Near("*cm , *cm , *cm , *Kg.",10,True)')

Data in the filtercolumn is something like 64cm x 25cm x 35cm = 10Kg.

The query do not return any data.I also tried running the below query to see if cm* can be searcher for, but with no result again

Select * from sampletable
where contains(filtercolumn,, '"cm*"')

If I do something like below, it does return all columns that have 35cm within the text.
Select * from sampletable
where contains(filtercolumn,, '"35cm"')

View 1 Replies View Related

Passing Parameter To OLAP As A Free Text And Interactive Sorting In Matrix

Apr 30, 2007

Dear All,



I am facing one problem with reporting services 2005 (SSRS), When i try to pass a parameter to Cube which is built in SSAS, i can not use a parameter where i can type the value instead of choosing it from a dimension.



Any way we can type the value for parameter, instead choosing from the drop down? If can, then how can we create the parameter? and how can i write a MDX to read it?



Thanks.



Regards,

Swarna.

View 4 Replies View Related

NULL Values Returned When Reading Values From A Text File Using Data Reader.

Feb 23, 2007

I have a DTSX package which reads values from a fixed-length text file using a data reader and writes some of the column values from the file to an Oracle table. We have used this DTSX several times without incident but recently the process started inserting NULL values for some of the columns when there was a valid value in the source file. If we extract some of the rows from the source file into a smaller file (i.e 10 rows which incorrectly returned NULLs) and run them through the same package they write the correct values to the table, but running the complete file again results in the NULL values error. As well, if we rerun the same file multiple times the incidence of NULL values varies slightly and does not always seem to impact the same rows. I tried outputting data to a log file to see if I can determine what happens and no error messages are returned but it seems to be the case that the NULL values occur after pulling in the data via a Data Reader. Has anyone seen anything like this before or does anyone have a suggestion on how to try and get some additional debugging information around this error?

View 12 Replies View Related

Text Qualifiers Around Non-text Values When Exporting To CSV

Aug 15, 2007

Hi
I'm using SSIS to export views & tables in SQL 2005 to csv files. My problem is that when I select that I want to use " as a text qualifier, it also uses them to surround non-text fields such as time/date and integer fields.

In SQL 2000 I used DTS packages and they handled the data without any issues.

Can anyone help?


Ta

Phil

View 3 Replies View Related

Get Dataset Values In Text Box

Jul 25, 2006

Hello,



How can I get all the dataset value in textbox.

e.g in dataset I jave field call "CustomerName".

I would like to get in the textbox all the cutomer name seperated by ",".

Is the same as I can use join(Parameters!CustomersName.Value,",") but I need to do that from the data set and not from the parameters since I don't have parameters for my customer name



Thanks

View 4 Replies View Related

Diving The Text Into Multiple Col Values

Feb 1, 2008



Hi,

I have a fulladdress column which holds the complete address with commas.
i want to divide that into add1,add2,add3.....
For eg: FullAddress is Primrose Cottage, Featherbed Lane, Wilmcote, Stratford-Upon-Avon, Warwickshire, CV37 0ER
Then
Add1 should be Primrose Cottage
Add2 should be Featherbed Lane

Add3 should be Wilmcote
Add4 should be Stratford-Upon-Avon

Please let me know the solution for this

Thanks in advance

View 5 Replies View Related

SQL 2000 - Large Text Values

Oct 10, 2007

Hi all,

I have an existing database, which is used to store complaints data and have one field, which stores notes in a varchar(8000) column.

My users are now wanting to store information, which exceed the number of available characters. What options do I have in facilitating this?

Many thanks

View 5 Replies View Related

Problems Replicating Text Values To Sybase ASE 12.5.3 !

Jan 15, 2007

Hi everybody,

I need to replicate text values from MS SQL Server 2005 to Sybase ASE 12.5.3 using replication of SQL Server 2005. The connection to the Sybase server is opened through a linked server using 'Sybase ASE OLE DB Provider' version 2.70.00.24.
As Sybase ASE 12.5.3 doesn't support parameter of type text for stored procedures I used INSERT-, UPDATE- and DELETE-statements for 'statement delivery' in arcticle properties.

This works fine as long as the text attributes contains less then 16 K characters. Any longer text is truncated after 16384 characters.

The OLE DB connection itself is configured to use 1 MB for 'DefaultLength for Long Data'. So the provider should transfer more then 16384 characters. And direct update through the 'linked server' prove that.

Did anybody else recognize this limitation ?
Is there a workaround which allows to replicate more then 16384 characteres ?


Wolfgang Kunk

View 6 Replies View Related

Loosing Values When Load From Text File

Apr 11, 2006

When loading a table in a data flow from a text file that contains non-null float values, I am seeing erratic and inconsistent results.  I am presently using SQL Server Destination in a data flow.

- With low volumnes of data, less that 50,000 rows, no problems

- But with higher volumnes, 2,000,000+ rows, I get different results depending on how I run the package.  If I run is directly (right-click and click on Execute), I get the expected result. 

But if I use SQL Server Agent to run the package, half of the values are lost and nulls are loaded instead.  I have inspected the into text file and there are few rows with null for the column.

Any help would be appreciated!

Greg

 

 

View 1 Replies View Related

SQL 2012 :: Null Values In Text Qualifier Error

May 27, 2014

I am working on SSIS Packages. I have raw files in which data is in text qualifier.

When I am trying to load files into database it's throwing me error when there is no values in text qualifier.

For Example. "Others","0","0"," "," "

If I have the value above in raw files. SSIS Package throwing me error in " " this column.

Saying Data Conversion failed.

View 5 Replies View Related

Select Boolean Values Merged In A Text Statement

Jul 20, 2005

Hi,I have boolean values in a table for ex. Federation. And I want toselect followingSelect 'Insert into' + member + 'test' as test1from federationThen I get error messageServer: Msg 403, Level 16, State 1, Line 1Invalid operator for data type. Operator equals add, type equals bit.Someone can help me out of it.Thanks an advance- Loi -

View 3 Replies View Related

Concatenating Parameter Values && Text; Nested CASE Statements

Sep 27, 2007

Hello.  I'm trying to reduce some code in my stored procedure and I'm running into lots of errors.  I'm somewhat of a novice with SQL and stored procedures so any help would be beneficial.
I have a SP that gets a page of user data and is also called when sorting by one of the columns (this data is placed in a repeater, btw).  I quickly learned that I wasn't able to pass in string parameters the way I had hoped in order to handle the ORDER BY and direction (ASC/DESC) so I'm trying to work around this.
So far I've tried the following with many errors.WITH Users AS (
SELECT ROW_NUMBER() OVER (ORDER BY CASE WHEN @OrderBy='FirstName' AND @Direction='DESC' THEN (FirstName + ' DESC')
WHEN @OrderBy='FirstName' THEN FirstName
WHEN @OrderBy='LastName' AND @Direction='DESC' THEN (LastName + ' DESC')
WHEN @OrderBy='LastName' THEN LastName
END
) AS Row,
UserID, FirstName, LastName, EmailAddress, [Role], Active, LastLogin, DateModified, ModifiedBy, ModifiedByName
FROM
vRF_Users
)

SELECT UserID, FirstName, LastName, EmailAddress, [Role], Active, LastLogin, DateModified, ModifiedBy, ModifiedByName
FROM Users
WHERE Row BETWEEN @StartRowIndex AND @EndRowIndex
 
I've tried a combination of similar things with parenthesises, without, doing "THEN FirstName DESC" without concatenating anything, etc.
I also tried: DECLARE @OrderByDirection varchar(32)
DECLARE @DESC varchar(4)
SET @DESC = ' DESC'

IF @Direction = 'DESC'
BEGIN
SET @OrderByDirection = (@OrderBy + @DESC)
END
And then writing my case statemet like this:ORDER BY CASE WHEN @Direction='DESC' THEN @OrderByDirection
ELSE @OrderBy
ENDObviously this didn't work either.  Is there any way to gracefully accomplish this or do I just have to use a bunch of if/else statements and lots of redundant code to evaluate all my @OrderBy and @Direction parameters???
 
Thanks in advance,
Jen

View 26 Replies View Related

Query To Get Values From Datetime Column Into Comma Separated Text

Dec 20, 2005

Hi All
I am working on a query to get all the datetime values in a column in a table into a comma separated text.
eg.
     ColumnDate                                                  --------------------------- 2005-11-09 00:00:00.0002005-11-13 00:00:00.0002005-11-14 00:00:00.0002005-11-16 00:00:00.000
I wanted to get something like
2005-11-09, 2005-11-13, 2005-11-14, 2005-11-16 
Have just started SQL and hence am getting confused in what I think should be a relatively simple query. Any help will be much appreciated. Thanks

View 1 Replies View Related

Multiple Text Values In Intersection Cells Of Matrix Report

May 30, 2007

I'd like to create a report with the folloiwng format:



DATE1 DATE2 DATE3 DATE4 DATE5 [fixed 5 dates across the top, from today to T+5]

THING1 x x x x

THING2 x x x x

THING3 x x x x

THING4 x x x x



my raw data looks like this:



THING1, DATE1, TEXT VALUE 1

THING1, DATE2, TEXT VALUE 2

&c&c.



Now: there may be 0, 1 or several (by which I mean 2-5 max) text values to display at each intersection. If there are zero I'd like it to be blank, if there are one or several, i'd like to display them in a little list within the cell.



Is this possible?

View 1 Replies View Related

Add Column With Fixed Number Of Values (text) To The Select Statement

Aug 1, 2007

Hello,

I have such a problem. Need to add additional column to my query. The column should consist of set of fixed number (same as number of query rows) values (text). At start thought it's simple but now Im lost. Is there any chance to do it. Apreciate any help. I need to tell that I have only access to select on this database so no use of operation on tables.

View 6 Replies View Related

Passing Parameter Values To Full Text Search Stored Procedure

Oct 24, 2006

I thought this would be quite simple but can't find the correct syntax:ALTER Procedure usp_Product_Search_Artist_ProductTitle

(@ProductTitle varchar(255))

AS

SELECT ProductTitle

FROM tbl_Product


WHERE CONTAINS(dbo.tbl_Product.ProductTitle, @ProductTitle)
   My problem is that if I pass "LCD Flat Screen" as teh @ProductTitle parameter the query falls over as it contains spaces. Guess i'm looking for something like: WHERE CONTAINS(dbo.tbl_Product.ProductTitle, '"' + @ProductTitle + "'")Thanks in advance.R  

View 4 Replies View Related

Gridview - SqlDatasource - How Do You Get All Values For A Like Text Parameter Or A Boolean Field When Filtering?

Mar 18, 2008

I have a gridview connected to a sqldatasource, and it works pretty good.  It gives me the subsets of the information that I need.  But, I really want to let them choose all the companies and/or any status.  What's the best way to get all the values in the gridview...besides removing the filters :)
I thought the company would be easy, I'd just set the selected value to blank "", and then it'd get them all....but that's not working.  And, for the boolean, I have no idea to get the value without having a separate query.
(tabs_done=@tabsdone) and (company like '%' + @company + '%')1 <asp:DropDownList ID="drpdwnProcessingStatus" runat="server">
2 <asp:ListItem Value="0">Open</asp:ListItem>
3 <asp:ListItem Value="1">Completed</asp:ListItem>
4 </asp:DropDownList>
5
6
7 <asp:DropDownList ID="drpdwnCompany" runat="server">
8 <asp:ListItem Value="">All</asp:ListItem>
9 <asp:ListItem Value="cur">Cur District</asp:ListItem>
10 <asp:ListItem Value="jho">Jho District</asp:ListItem>
11 <asp:ListItem Value="sea">Sea District</asp:ListItem>
12 <asp:ListItem Value="san">Net District</asp:ListItem>
13 <asp:ListItem Value="sr">Research District</asp:ListItem>
14 </asp:DropDownList>
15
16
17 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HRFormsConnectionString %>"
18 SelectCommand="SELECT DISTINCT [id], [lastname], [company] FROM [hr_term] hr where (tabs_done=@tabsdone) and (company like '%' + @company + '%')">
19 <SelectParameters>
20 <asp:ControlParameter ControlID="drpdwnProcessingStatus" DefaultValue="0" Name="tabsdone" PropertyName="SelectedValue" />
21 <asp:ControlParameter ControlID="drpdwnCompany" DefaultValue="" Name="company" PropertyName="SelectedValue" />
22 </SelectParameters>
23 </asp:SqlDataSource>
24

 

View 3 Replies View Related

Reporting Services :: Selecting Data Using One Parameter With Multiple Text Values

Oct 9, 2015

I am using SSRS 2008 R2 Report Builder 3.0 (10.50.4276.0) . I have simple set of data which has a persons Title and Name e.g. Mr Smith, Miss Jones, Doctor Foster

The report has a parameter where the user can select which records to show based on the matching titles (Mr, Miss, Doctor)

The Query for the report uses Title in (@Title) where @Title is the only parameter which can take multiple values. The report works correctly for any 1 value selected, but as soon as 2 or more values are ticked in the drop down, it fails.

I believe the parameter value is being passed into the query with a comma separating the values e.g. Mr,Miss which causes the IN statement to give an error, as the statement would be where Title IN ('Mr,Miss') which does not match any of the data values.

The parameter value passed needs to be 'Mr','Miss' for the IN statement to work. What statement do I have to put in the report query to get it to select any of the data rows where the title matches any 1 of the selected values?

View 5 Replies View Related

Report Printing With Blank Pages When Large Amount Of Text In Column Values. Urgent

Apr 16, 2008

Hi every one,
I am facing problem in printing the reports from browser and also when i export it to pdf,the problem i am facing is blank pages are coming when report column getting the large amount of text around 2500 characters into column value.
can any one help me in this issue?. if the report is getting acceptable amout of data it is printing in proper way i.e no balnk pages at all.i maintained all properties like margins+body size < page size.

View 4 Replies View Related

SQL 2005 Bug? Cannot Create Full Text Index For VARBINARY Column That's Populated With Converted NVARCHAR Values

Jul 11, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...I have a table I'm trying to apply a full text catalog to, however no results are ever returned due to the text column being cataloged being of varbinary(max) that's being populated from a converted nvarchar(max) value - I've narrowed it down to this specifically, populating with non nvarchar text seems to work fine.To re-create the problem quickly...If I populate the column viaCONVERT(varbinary(max), 'test text')then there is no problem, I get results as expected.However if I populate the column viaCONVERT(varbinary(max), CAST('test text' as nvarchar(max)))no results are ever returned.Is this a bug with SQL Server 2005 Full Text Indexing? I'm happily creating full text catalogs when an nvarchar is not getting converted into a varbinary.I'm setting the Document Type column to '.html' (I've tried changing this to '.txt' in case it was a fault with the html ifilter but the problem persists so I believe I can rule this out).The reason I need to convert an nvarchar to varbinary is that the table holds multi-lingual text and I'm adding a html meta tag <META NAME="MS.LOCALE" CONTENT="ES"> to the beginning in order for the full text indexing word breaker to select the correct language to catalog the text with. The aim being to provide more relevant searches in users native languages (I've read a few articles that describe this technique, but it's the first time I've tried to apply it).Any pointers / suggestions would be greatly appreciated. Cheers,Gavin.

View 14 Replies View Related

SQL 2005 Bug? Cannot Create Full Text Index For Varbinary Column That's Populated From Converted Nvarchar Values

Jul 11, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...

I have a table I'm trying to apply a full text catalog to, however no results are ever returned due to the text column being cataloged being of varbinary(max) that's being populated from a converted nvarchar(max) value.

To re-create the problem quickly...

If I populate the column via
CONVERT(varbinary(max), 'test text')
then there is no problem, I get results as expected.

However if I populate the column via
CONVERT(varbinary(max), CAST('test text' as nvarchar(max)))
no results are ever returned.

Is this a bug with SQL Server 2005 Full Text Indexing? I'm happily creating full text catalogs when an nvarchar is not getting converted into a varbinary.

I'm setting the Document Type column to '.html' (I've tried changing this to '.txt' in case it was a fault with the html ifilter but the problem persists so I believe I can rule this out).

The reason I need to convert an nvarchar to varbinary is that the table holds multi-lingual text and I'm adding a html meta tag <META NAME="MS.LOCALE" CONTENT="ES"> to the beginning in order for the full text indexing word breaker to select the correct language to catalog the text with. The aim being to provide more relevant searches in users native languages (I've read a few articles that describe this technique, but it's the first time I've tried to apply it).

Any pointers / suggestions would be greatly appreciated. Cheers,
Gavin.

UPDATE: Below is a T-SQL script you can run to demonstrate the effect I'm experiencing...




Code Snippet

-- Create test database
CREATE DATABASE FullTextTest
GO
USE FullTextTest
GO

-- Create test data table
CREATE TABLE TestTable
(
pk UNIQUEIDENTIFIER NOT NULL CONSTRAINT tablePK PRIMARY KEY,
varbinarycol VARBINARY(MAX),
documentExtension VARCHAR(5),
)
GO

-- The below single entry WILL BE FOUND (the text source is being entered directly)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX),'<META NAME="MS.LOCALE" CONTENT="EN">test entry 1'), '.html')

-- The bellow two entries below WILL NOT BE FOUND (the text source is taken from an NVARCHAR(MAX) value)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry 2' AS NVARCHAR(MAX))), '.html')
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry 3' AS NVARCHAR(MAX))), '.html')
GO

-- Create the full text catalog
sp_fulltext_database 'enable'
GO
CREATE FULLTEXT CATALOG TEST AS DEFAULT
GO
CREATE FULLTEXT INDEX ON TestTable (varbinarycol TYPE COLUMN documentExtension LANGUAGE 1033)
KEY INDEX tablePK
GO

-- NOTE: You might need to give the catalog a chance to build before running the script below.

-- Now do a search that SHOULD RETURN 3 ROWS of data, but ONLY 1 ROW IS RETURNED
SELECT CAST(varbinarycol AS NVARCHAR(MAX)) FROM TestTable WHERE CONTAINS(varbinarycol, 'test')

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved