Problems With Null Text Boxes When Doing Like Search

Apr 10, 2007

I have three text boxes firstname, lastname, dob.  It is set up to do a like search on the the text boxes.  If a user wants to do a search for just the last name it will not work.  You must type in something in all three boexes.  Doesn't anybody know how to correct  this.  Here is the code.   Thanks.

 

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

GridView1.Visible = False

GridView2.Visible = False

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

GridView1.DataSourceID = "SqlDataSource1"

GridView1.DataBind()

GridView2.DataSourceID = Nothing

GridView2.DataBind()

GridView1.Visible = True

End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

GridView2.DataSourceID = "SqlDataSource2"

GridView2.DataBind()

GridView1.DataSourceID = Nothing

GridView1.DataBind()

GridView2.Visible = True

End Sub

 

Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">

<title>Meditech Radiology Numbers</title>

<link href="StyleSheet.css" rel="stylesheet" type="text/css" />

</head>

<body>

<form id="form1" runat="server">

<div id="master_headertop"><asp:HyperLink ID="HomePageLink" runat="server" ImageUrl="~/images/headertop_img.jpg" /></div>

 

<div id="master_menu">

<div class="sidebar">

<div class="sidebarheader">

Demographic search</div>

<div id="master_sidebarSamples" class="sidebarcontent">

&nbsp;

<table>

<tr>

<td style="width: 100px">

<asp:Label ID="Label1" runat="server" Text="First"></asp:Label></td>

<td style="width: 100px">

<asp:TextBox ID="FirstName" runat="server"></asp:TextBox></td>

</tr>

<tr>

<td style="width: 100px; height: 26px;">

<asp:Label ID="Label2" runat="server" Text="Last"></asp:Label></td>

<td style="width: 100px; height: 26px;">

<asp:TextBox ID="LastName" runat="server"></asp:TextBox></td>

</tr>

<tr>

<td style="width: 100px">

<asp:Label ID="Label3" runat="server" Text="DOB"></asp:Label></td>

<td style="width: 100px">

<asp:TextBox ID="DOB" runat="server"></asp:TextBox></td>

</tr>

<tr>

<td style="width: 100px">

</td>

<td style="width: 100px">

<asp:Button ID="Button1" runat="server" Text="Search" /></td>

</tr>

</table>

</div>

</div>

<div class="sidebar">

<div class="sidebarheader">

Search by Mr#</div>

<div id="master_sidebarWalkthroughs" class="sidebarcontent">

&nbsp;

&nbsp;<table>

<tr>

<td style="width: 100px">

<asp:Label ID="Label5" runat="server" Text="MR #"></asp:Label></td>

<td style="width: 100px">

<asp:TextBox ID="MR" runat="server"></asp:TextBox></td>

</tr>

<tr>

<td style="width: 100px">

</td>

<td style="width: 100px">

<asp:Button ID="Button2" runat="server" Text="Search" /></td>

</tr>

</table>

</div>

</div>

&nbsp;<br />

&nbsp; &nbsp; &nbsp;

</div>

<div id="master_content" style="height: 399px">

 

&nbsp;

&nbsp;&nbsp;&nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

DataSourceID="SqlDataSource1">

<Columns>

<asp:BoundField DataField="LAST" HeaderText="LAST" SortExpression="LAST" />

<asp:BoundField DataField="FIRST" HeaderText="FIRST" SortExpression="FIRST" />

<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />

<asp:BoundField DataField="RAD #" HeaderText="RAD #" SortExpression="RAD #" />

<asp:BoundField DataField="MR#" HeaderText="MR#" SortExpression="MR#" />

<asp:BoundField DataField="EXAM#" HeaderText="EXAM#" SortExpression="EXAM#" />

<asp:BoundField DataField="EXAM DATE" HeaderText="EXAM DATE" SortExpression="EXAM DATE" />

<asp:BoundField DataField="EXAM NAME" HeaderText="EXAM NAME" SortExpression="EXAM NAME" />

<asp:BoundField DataField="ORDER DOC" HeaderText="ORDER DOC" SortExpression="ORDER DOC" />

<asp:BoundField DataField="Column 9" HeaderText="Column 9" SortExpression="Column 9" />

</Columns>

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RADConnectionString2 %>"

SelectCommand="SELECT * FROM [Full File through 2006] WHERE (([FIRST] LIKE '%' + @FIRST + '%') AND ([LAST] LIKE '%' + @LAST + '%') AND ([DOB] LIKE '%' + @DOB + '%'))" OnSelecting="SqlDataSource1_Selecting">

<SelectParameters>

<asp:ControlParameter ControlID="FirstName" DefaultValue=" " Name="FIRST" PropertyName="Text"

Type="String" />

<asp:ControlParameter ControlID="LastName" DefaultValue=" " Name="LAST" PropertyName="Text"

Type="String" />

<asp:ControlParameter ControlID="DOB" DefaultValue=" " Name="DOB" PropertyName="Text"

Type="String" />

</SelectParameters>

</asp:SqlDataSource>

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">

<Columns>

<asp:BoundField DataField="LAST" HeaderText="LAST" SortExpression="LAST" />

<asp:BoundField DataField="FIRST" HeaderText="FIRST" SortExpression="FIRST" />

<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />

<asp:BoundField DataField="RAD #" HeaderText="RAD #" SortExpression="RAD #" />

<asp:BoundField DataField="MR#" HeaderText="MR#" SortExpression="MR#" />

<asp:BoundField DataField="EXAM#" HeaderText="EXAM#" SortExpression="EXAM#" />

<asp:BoundField DataField="EXAM DATE" HeaderText="EXAM DATE" SortExpression="EXAM DATE" />

<asp:BoundField DataField="EXAM NAME" HeaderText="EXAM NAME" SortExpression="EXAM NAME" />

<asp:BoundField DataField="ORDER DOC" HeaderText="ORDER DOC" SortExpression="ORDER DOC" />

<asp:BoundField DataField="Column 9" HeaderText="Column 9" SortExpression="Column 9" />

</Columns>

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RADConnectionString3 %>"

SelectCommand="SELECT * FROM [Full File through 2006] WHERE ([MR#] = @column1)">

<SelectParameters>

<asp:ControlParameter ControlID="MR" Name="column1" PropertyName="Text" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

</div>

<br />

<br />

&nbsp; &nbsp;

 

</form>

</body>

</html>

View 18 Replies


ADVERTISEMENT

Text Boxes

Jan 29, 2008

Hi,
I am doing a report in which i have to create Wall chart kind of layout and for that i have to place Text Boxes on the
report at run time.Now In my Layout i have some Text Boxes which are going Out of the page(Starts from page 1 and Ending on page 2)but when i am looking my report in the Print Preview the Report Viewer is shifting the entire Text Box to Page 2. Can i do something to print the report as they are seen in the Normal layout.

Can any one help me out with this.......
Amit

View 6 Replies View Related

Concatenating 2 Text Boxes

Feb 13, 2006

Hi,

How do we concate a normal text with an underlined text?

eg: I would like to concate :

textbox1 = my email address:

and

textbox2 = xxx@hotmail.com

into a new textbox3.

expected result: textbox3 : my email address:xxx@hotmail.com

Really appreciate your help.

Thanks

View 4 Replies View Related

SelectCommand Multi Text Boxes

Nov 7, 2007

I would like a form that has 3 text boxes. These 3 boxes are going to be used for entering search criteria. The first box is for searching a field called CasePK. The second is for searching a field called LinePK and the third is for searching a field called DOS. DOS is a date field. The other two are text fields.I am using a SQLDATASOURCE and a Gridview. What will the SelectCommand look like so that I can search the 3 fields using the data from the textboxes?

View 1 Replies View Related

Of Multiple Parameters, SqlDataSource And Text Boxes

Feb 12, 2006

Hi,Hope if someone can help me here. Keep in mind I an fairly new to .NET and SQL and am learning to break my MS Access habit :)
I have a web form that is using a SqlDataSource and a FormView control. In addition to this I have 2 text boxes. What I am trying to do is display results in the FormView based on what a user types into one of the Text Boxes (one or the other…Not both)
 
The SELECT statement in the SqlDataSource looks like this in concept.
SELECT Field1, Field2, Field3, Field4FROM dbo.MYTABLEWHERE (Field1 = @Field1) AND (Field2 IS NULL)OR  (Field2 = @Field2) AND (Field1 IS NULL)
 
I have the two text boxes pointing at the parameters (@Field1 and @Field2) so in theory I would expect that when a user populates one of the text boxes and clicks a button to databind the FormView it would display a record matching that criteria…. But it’s not all I get is a blank/missing FormView.
I tried different variations on the SQL statement and tried using  = ''  instead of IS NULL but still the same results. However, if I populate one text box with a value that I know is not in my table and populate the other with a value of which I know exists in my table is…It works.What am I missing?
 

View 13 Replies View Related

Toggling Visibility Between Two Text Boxes In Ssrs

Oct 9, 2012

how visibility can be toggled between two textboxes in ssrs? For example if textbox1 is visible and textbox2 is hidden initially and textbox2 should be visible when clicked on textbox1 and textbox1 should go invisible when textbox2 is shown... and then again when clicked on textbox2, textbox1 should be visible and textbox2 should go invisible.In a short, it is like switching visibility between 2 textboxes... A click on first textbox should display the second textbox and another click on second text box should display first text box.I cannot provide parameter as it is not there in the requirement. how to toggle the text within a single text box to fulfill above requirement...

View 1 Replies View Related

Allowing For Blank Fields In Date Text Boxes

Jun 27, 2005

Several textboxes are being on a web form for date entry. and we want to allow the user to leave date fields blank (if particular date is unknown).  However, when the field is left blank, the SQL Server 2000 database defaults to 1/1/1900 (datatype = datetime).My question is as follows:  How is it possible to leave a date textbox field blank, and either send 000000 or spaces to the SQL Server 2000 database datetime field?Any advice/insight is appreciated!  Rob

View 2 Replies View Related

How To Link Combo Boxes And A Text Box In A Datagrid View?

Mar 11, 2008

Hi folk..
can some body help me with this problem..???

I have a grid view on a form which has got colums which are set as data combo boxes. and a third column whish is set to a text box. all the 3 controls on the datagrid view are bound with sql server table.
they are asociated with two saparate tables within 1 database...
now what i want is that the user of the application can select either combo box 1 of teh 2nd combo box.
and automatically the syncronize and also the text column asociates with related data..

for example

Country City Pincode
India vasco 403802

now while flling the grid vew.. the user can select either country or city.. automatically
both syncronize with related data and so does the text box.


plz help me with the code.. as well..


thanks a million

View 1 Replies View Related

Reporting Services :: Dynamic Positioning Of Text Boxes In SSRS

Sep 30, 2015

I have a user table with Label and value fields where i would like to control the display of the text boxes based on the values selected in my user table.Can we adjust the text box positions dynamically based on the user table values.

Ex: Table

Label1 Field1 Label2  Field2  Label3 Field3
ID       100                           Dept   Sales

Report Design :

Label1: ID    Field1:100
Label2:          Field2:
Label3:Dept   Field3:Sales

Expected Result :

Label1: ID    Field1:100
Label3:Dept   Field3:Sales

In my table i don't have values for Label 2 & Field 2 , can we adjust the spacing conditionally to be utilized by Label3 & Field3 in SSRS.

Note : Above mentioned data is just for an example and in my actual report i can have more than 3 columns and report is looking ugly with all the spacing if i don't have data in all the fields.

View 9 Replies View Related

Help W/ Stored Procedure? - Full-text Search: Search Query Of Normalized Data

Mar 29, 2008

 Hi -  I'm short of SQL experience and hacking my way through creating a simple search feature for a personal project. I would be very grateful if anyone could help me out with writing a stored procedure. Problem: I have two tables with three columns indexed for full-text search. So far I have been able to successfully execute the following query returning matching row ids:  dbo.Search_Articles        @searchText varchar(150)        AS    SELECT ArticleID     FROM articles    WHERE CONTAINS(Description, @searchText) OR CONTAINS(Title, @searchText)    UNION    SELECT ArticleID     FROM article_pages    WHERE CONTAINS(Text, @searchText);        RETURN This returns the ArticleID for any articles or article_pages records where there is a text match. I ultimately need the stored procedure to return all columns from the articles table for matches and not just the StoryID. Seems like maybe I should try using some kind of JOIN on the result of the UNION above and the articles table? But I have so far been unable to figure out how to do this as I can't seem to declare a name for the result table of the UNION above. Perhaps there is another more eloquent solution? Thanks! Peter 

View 3 Replies View Related

SQL Search :: Full Text Search With Single Character Returns All Rows

Jul 21, 2015

Our clients want to be able to do full text search with a single letter. (Is the name Newton, Nathan, Nick?, Is the ID N1, N2...). Doing a single character full text search on a table work 25 out of 26 times. The letter that doesn't work is 'n'. the WHERE clause CONTAINS(full_text_field, ' "n*" ') returns all rows, even rows that have no 'n' in them anywhere. Adding a second letter after the "n" works as expected.

Here is an example

create table TestFullTextSearch (
Id int not null,
AllText nvarchar(400)
)
create unique index test_tfts on TestFullTextSearch(Id);
create fulltext catalog ftcat_tfts;

[Code] ....

View 4 Replies View Related

SQL Server 2014 :: Semantic Search Not Finding Keywords Identified By Full-Text Search?

Nov 6, 2014

I have a scenario of where the standard Full-Text search identifies keywords but Semantic Search does not recognize them as keywords. I'm hoping to understand why Semantic Search might not recognize them. The context this is being used in medical terminology and the specific key words I noticed missing right off the bat were medications.

For instance, if I put the following string into a FT indexed table

'J9355 - Trastuzumab (Herceptin)'
AND
'J9355 - Trastuzumab emtansine'

The Semantic Search recognized 'Herceptin' and 'Emtansine' but not 'Trastuzumab'

Nor in

'J8999 - Everolimus (Afinitor)'

It did not recognize 'Afinitor' as a keyword.

In all cases the Base of Full-Text did find those keywords and were identifiable using the dmvsys.dm_fts_index_keywords_by_document.It does show the index as having completed.

why certain words might not be picked up while others would be? Could it be a language/dictionary issue? I am using English and accent insensitive settings?

View 0 Replies View Related

Create Site Search Using Sql Server Full Text Search

Jul 24, 2007

would you use sql server "full text search" feature as your site index?  from some reason i can't make index server my site search catalog, and i wonder if the full text is the solution. i think that i wll have to you create new table called some thing like "site text" and i will need to write every text twice- one the the table (let's say "articles table") and one to the text. other wise- there is problems finding the right urlof the text, searching different tables with different columns name and so on...
so i thought create site search table, with the columns:
id, text, url
and to write every thing to this table.
but some how ot look the wrong way, that every forum post, every article, album picture or joke will insert twice to the sqr server...
what do you think? 

View 1 Replies View Related

SQL Search :: Full Text Search Of PDF Files In A File Table

Mar 30, 2013

I have installed the Adobe iFilter 11 64 bit and set the path to the bin folder. I still cannot find any text from the pdf files. I suspect I am missing something trivial because I don't find much when I Bing for this so it must not be a common problem.Here is the code.

--Adobe iFilter 11 64 bit is installed
--The Path variable is set to the bin folder for the Adobe iFilter.
--SQL Developer version 64 bit on both Windows 7 and Windows 8.
USE master;
GO
DROP DATABASE FileTableStudy;
GO
CREATE DATABASE FileTableStudy
ON PRIMARY

[code]....

View 14 Replies View Related

How Can I Search Throught DOCX (MS Word 2007) Documents By SQL Server 2005 Full Text Search Engine?

Dec 11, 2006

How can I search throught DOCX (MS Word 2007) documents by SQL Server 2005 Full Text Search engine?

Should I something download?

View 6 Replies View Related

Full-Text Search: Prefix / Suffix Search

Sep 14, 2004

Please help me to create an SQL Server 2000 Stored Procedure for using prefix and suffix terms.

Example:

Say I want to find "Terminator" (1984).

I want to be able to use "Term" or "ator" as search results and still return the proper record.

Here is my Stored Procedure creation sql:


CREATE PROCEDURE sps_searchTitles(@searchTerm varchar(255)) AS
SELECT * FROM Video
WHERE FREETEXT (Video.*, '"*@searchTerm*"')
GO


--- The above does not appear to properly check both prefix ("Term---") and suffix ("---ator") terms.

I am trying to accomplish what is similarly done with LIKE '%term%'.

thanks, YM

View 1 Replies View Related

Full Text Search- Substring Search Not Working

Jul 6, 2007

I have Sql server 2005 SP2.
I enabled it for Full Text search. Substring search where i enter *word* doesn't return any row.
I have a table testtable where description has word Extinguisher.

If i run a query with *ting* it doesn't return any row.
select * from testtable where contains(description,'"*xting*"') ;

But it works if i do
select * from testtable where contains(description,'"Exting*"') ;

The Full text search document says it supports substring search.
Is it an issue with sql server 2005?Please help.

View 7 Replies View Related

SQL Search :: Can't Get Expected Results With Contains And Full Text Search?

Nov 1, 2015

I am using Sql Server 2014 Express edition.I have a table with a varchar(max) column. I have created a full text search that use the stoplist "system". column has this struct: xxx.yyy.zzz.... where xxx, yyy, zzz... are numbers, like 123.345.123123.366456...I can have rows like that:

123.345
123.345
123.345.444
123.345.555
123.345.666
123.345.444.777
123.345.444.888
123.345.555.999

I am trying this query:

select * from Mytable where
contains(MyColumn, '123.345.')

I gues the contains would return all the rows with column contains 123.345, but this does not return all the expected rows, only one row.I have tried to replace "." with "-" but the result is the same.I have also tried with '123.345.*. In this case I have got more results, but no all the exptected rows.If I use this query:

select * from MyTable where
MyCOlumn like '123.345.%';

View 12 Replies View Related

Why I Always See That Full Text Search Is Always Slower Than LIKE Search?

Apr 2, 2004

for example:

SELECT * from [table1] WHERE CONTAINS([msgcomment], '"fast" NEAR "performance"')

would always slower than

SELECT * from [table1] WHERE [msgcomment] = '%fast%performance%'


Why? and how can it be solved? can you help me?

:)

View 6 Replies View Related

SQL Search :: Full Text Search Anomaly

Jun 24, 2015

I'm experiencing an anomaly with my Full text index.

Setup : SQL Server 2005
Indexed Table:
Assets
ID - int (PK, auto increment)
Ref - varchar(50)

[code]....

I have re-built the full-text index, no change.

View 2 Replies View Related

Adding A Full Text Search Across Multiple Tables (with Text Fields)

Sep 7, 2007

Hi, i'm trying to do a full text search on my site to add a weighting score to my results.  I have the following database structure:
Documents: - DocumentID (int, PK) - Title (varchar) - Content (text) - CategoryID (int, FK)
Categories: - CategoryID (int, PK) - CategoryName (varchar)
I need to create a full text index which searches the Title, Content and CategoryName fields.  I figured since i needed to search the CategoryName field i would create an indexed view.  I tried to execute the following query:
CREATE VIEW vw_DocumentsWITH SCHEMABINDING ASSELECT dbo.Documents.DocumentID, dbo.Documents.Title, dbo.Documents.[Content], dbo.Documents.CategoryID, dbo.Categories.CategoryNameFROM dbo.Categories INNER JOIN dbo.Documents ON dbo.Categories.CategoryID = dbo.Documents.CategoryID
GOCREATE UNIQUE CLUSTERED INDEX vw_DocumentsIndexON vw_Documents(DocumentID)
But this gave me the error:
Cannot create index on view 'dbname.dbo.vw_Documents'. It contains text, ntext, image or xml columns.
I tried converting the Content to a varchar(max) within my view but it still didn't like.
Appreciate if someone can tell me how this can be done as surely what i'm trying to do is not ground breaking.

View 2 Replies View Related

SQL Server 2000 Full Text Search (extract Pieces Of Text)

Sep 12, 2007

Hello everyone !
I want to perform Full Text Search with SQL Server 2000. My documents (.doc, .xls, .txt, .pdf) are stored in a SQL Server field which is binary (the type of the column is image).
I would like to know, how you can extract pieces of text from the documents.
Example:
I have a ASPX page with codebehind in C# making the search in a table in SQL server that is full text indexed.
I make a search looking for the word "peace", than SQL server will take care about the search and return it to me the rows that match with that. But also I'd like to extract the 50 characters before and after where sql server found the word "peace" to show in the result page.
Does anyone has any idea how to work around it ?
 Best regards.
Yannick

View 5 Replies View Related

Full Text Search Vs LIKE Search

Jan 24, 2006

Are there any big differences between the two search techniques? It seems like they are both very similar.

SELECT * FROM TABLE1 WHERE TEXTFIELD1 LIKE '%DATABASES%'
SELECT * FROM TABLE1 WHERE CONTAINS (TEXTFIELD1 ,' "DATABASES" ')

View 2 Replies View Related

Sql Statements With Null Search Parameters

Jan 19, 2008



i have a form where filter information is going to be keyed/selected.
the data from that form is copied into a struct regardless of whether each field has data in it or not (eg firstname may have been entered but not lastname,
so the struct would contain firstname = 'john' and lastname = null)
i then want to build an sql statement (not using stored procedures but just direct sql) from this struct data but obvioulsy can't just have
a statement that says 'select ID from theTable where firstname='john' AND lastname=''" as this won't bring back the right info, if anything at all.

i normally build the statements like this




Code Block
string sql = "select ID from MembersTemp where FirstName = '{0}'";
SqlCommand cmd = new SqlCommand(string.Format(sql, FirstName), _con);
_con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
List<int> result = new List<int>();
while (rdr.Read())
{
etc....






so really, what's the best way of building an sql statement where some search parameters won't hold a value and therefore need ignoring.


also, whilst i'm here, i use viz studio 2005 and sql server 2005 (express??), so that does mean i'm using TSQL as well??

View 10 Replies View Related

SQL 2012 :: Include Zero String And Null Value In Search

Aug 22, 2014

I need to search on varchar column including zero length string and null value.What is the best way to do it?

View 5 Replies View Related

SQL Search :: DELETE Rows From All Tables In Database Where Column Name Is Geo And Value Is NULL

Nov 16, 2015

I need to look at all tables in a database that has a column name of GEO

Then look for all values in each table where the GEO value is NULL and delete each of the records found...

View 6 Replies View Related

Text Search

Jan 24, 2001

Can we do text search in sql server 7.0 ?
if yes then what is the tool required for it?

View 1 Replies View Related

Text Search

Mar 15, 2007

before I wade in and try to create a text search facility on my SQL server DB, can somebody point me in the right direction for a search ranking SQL query?

I need the user to input two or three keywords into a search field and for the (small) DB to return a handful of rows in order of popularity of the keywords.

I gather from my other post that I will need to be mindful of SQL injections but that's another issue.

I just need some pointers at this stage.

Thanks folks

View 3 Replies View Related

Full Text Search Help

Apr 23, 2007

 Hi I have a full text index on my product table. When I do a search for Record, it returns all values for Record and Records.Now If I do a search with a spelling mistake say Recod . it doen't return anything.How can I get the full text to return my query even if there is a spelling mistake ? Thanks  My query:SELECT *  From Product        WHERE FREETEXT (description, @SearchString)

View 5 Replies View Related

Search Text Full

Dec 10, 2007

hi all.i want to search, for example :"test string" in database :  table have column(name) , i want to search all rows with  column(name) is "test " or "string" or "test string"i don't want to use(full text search of sqlserver 2005 ) can i help me.thanks in advance 

View 1 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

Full-Text Search

Apr 19, 2008

Hello !
With SQL Server Management Studio Express I have created a catalog and a index.Here is the code :
create fulltext catalog myfirstcatalogcreate unique index myfirstindex on northwind.dbo.customers(companyname)create fulltext index on northwind.dbo.customers(companyname)key index myfirstindex ON myfirstcatalogWITH CHANGE_TRACKING AUTO  
With SQL Server Management Studio Express and the following command the full text search is working fine.
select companynamefrom northwind.dbo.customerswhere contains(companyname, ' "blauer" ') 
I have a big problem :
When I try to use this database (NOTRHWIND.MDF) into my .aspx file with VWD 2008 I get an error :
Cannot use full-text search in user instance.
 
Can you tell me what can I do to make use of full-text search inside my aspx pages ?
Thank You !

View 5 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







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