Search For Keyword In Database

Mar 14, 2008

Hii

I want to search for a keyword in the database.
The database has approximately 30 tables and the amount of data in tables is very large. Most of the tables hold 25000 rows. The search procedure for searching a keyword that i want to use is as below. When i executed the stored proc it took 20 minutes. What i want to know is full-text search a better option than this or is there any other way out.


CREATE PROC SearchAllTables

(

@SearchStr nvarchar(100)

)

AS

BEGIN

CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

SET NOCOUNT ON

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)

SET @TableName = ''

SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

WHILE @TableName IS NOT NULL

BEGIN

SET @ColumnName = ''

SET @TableName =

(

SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))

FROM INFORMATION_SCHEMA.TABLES

WHERE TABLE_TYPE = 'BASE TABLE'

AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName

AND OBJECTPROPERTY(

OBJECT_ID(

QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)

), 'IsMSShipped'

) = 0

)

WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)

BEGIN

SET @ColumnName =

(

SELECT MIN(QUOTENAME(COLUMN_NAME))

FROM INFORMATION_SCHEMA.COLUMNS

WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)

AND TABLE_NAME = PARSENAME(@TableName, 1)

AND DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')

AND QUOTENAME(COLUMN_NAME) > @ColumnName

)



IF @ColumnName IS NOT NULL

BEGIN

INSERT INTO #Results

EXEC

(

'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)

FROM ' + @TableName + ' (NOLOCK) ' +

' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2

)

END

END

END

SELECT ColumnName, ColumnValue FROM #Results

END


EXEC SearchAllTables 'FileName'

View 7 Replies


ADVERTISEMENT

Keyword Search

May 27, 2007

I am trying to implement a band search on my web site (concert listings) and would like it to behave a bit more intelligently than a standard match on the band name.
At the moment I have a stored procedure that just selects every show that features a band with exactly the same name as the search term. What I'm now trying to do is when the user enters a band name containing the '&' character I would also like to search using the word and 'and'. For example, if they search for 'Rise & Fall', they should get details on all shows featuring 'Rise & Fall' OR 'Rise And Fall'. Is it possible to do this within my stored procedure?

View 2 Replies View Related

Search By Keyword

Jan 31, 2008

 Greetings,  I am a php developer, and running a little bit out of deadline in a project. Can someone provide me with a VERY simple way to implement search by keyword in C#?  I have already implemented a search page (according to firstname, lastname etc) that works on a drop down menu (where you have the option to choose seach by keyword) . So, I need to change something in my SQL query to make this work. I already knew from my SQL experience that the simplest and probably the SLOWEST and MOST UN EFFICIENT one was using LIKE. I don't mind using it but I can't since I will end up  having something close to that: SELECT * FROM users WHERE keyword_entered LIKE @keyword;      (or '@keyword)  which does not work.      however SELECT * FROM users WHERE keyword_entered LIKE 'somename%'; does work! I guess the trick is in putting the % after the keyword. ( I would have done that in php by putting the entered keyword in a string and than add to it % and pass it to the SQL query and I dunno how to do that in .NET)any ideas? 

View 7 Replies View Related

Keyword Search

Apr 18, 2008


Hi,

I have a table like

ProductId, Description, Description2

where Description and Description2 are text datatypes.

I'm trying to return all records where myKeyword exists as a singular word in either of these two fields.

Should I create a child table where each word in each of these fields has its own row for each product and query against that or is there an efficient way of querying this result without creating the extra child table?

Many thanks for any pointers

Dan

View 4 Replies View Related

Large Keyword Search

Apr 11, 2005

I’m working on a project that will allow a user to search through approx 100,000 records in a SQL table. Three of the columns are ‘text’ fields that hold paragraphs of text. The user interface has a ‘general search’ option so that they can enter a number of key words and the database will return a count of the records found containing the keywords.
At the moment I split the input and then build a query based on their input. For instance if they enter ‘hello world’ the input is split into two strings ‘hello’ and ‘world’. I then build the query in a loop and get a query like so:
Select Count(ID) as myCount FROM myTable WHERE (colOne like ‘%hello%’ AND colOne like ‘%world%’) OR (colTwo like ‘%hello%’ AND colTwo like ‘%world%’) OR (colThree like ‘%hello%’ AND colThree like ‘%world%’)
Unfortunately this query runs EXTREMELY slowly and just seems wrong. Is there a more efficient way I should be doing these types of searching? This method works ok on 100 records, but this is the first time I have worked on such a large database.
Is it also possible to search a text column and look for exact matches?
For instance I have 2 records with their textfield containing:
Rec 1: the news for today is blah blah. Rec 1: this is a new item
If I currently search for ‘new’ (select colID from myTable where colOne like ‘%new%’) I will get both these records, but I’d really only like to pull out the second record.
Any help would be great appreciated! :)
 

View 1 Replies View Related

Keyword Search Program

Sep 11, 2003

Hi,

I am in the middle of developing procedure for keyword search for our website.

Input parameter is a string consisting keywords in comma delimited format.

This is the example of data I get from business group which I use to populate my key_search table.

product_id keyword
1 Microsoft, training
1CA, DBA
1CA, developer
1CA, network admin
1AZ, DBA
1AK, developer
1MN, DBA
1MN, developer
1OH, developer
2Microsoft, training
2AZ, DBA
2AZ, developer
2IL, developer
2MN, DBA
2CA, developer
2NY, business analyst
2NY, DBA
2NY, developer
2NY, programmer
3Oracle, training
3finance
4Oracle demo
4logistic
4Oracle Financials
4Financial Analyzer

They have provided search string examples like 'Microsoft, DBA, CA'
or 'CA'
or 'Microsoft, developer' or 'training'

I have script ready to remove comma from the string and store words from the input string in a temporary table.
But this is the easiest part.

The Confusing part now for me is to write the optimal code for retrieving the exact match from the key_search table as there is no limit on how many words can be in the string, it can be 1, 2, 3 or more.

Any suggestions on how should I handle this search?

View 6 Replies View Related

Multi Keyword Search SP

Jul 23, 2005

Is it possible to write a Stored Procedure that takes a string ofsearch keywords as argument and returns the recordset? At the mo I ampassing the WHERE String as argument.I got this technique from an Extreme Ultradev tutorial by Rick Curtisit looked quite ok:http://www.princeton.edu/~rcurtis/u...tutorial12.htmlI have to admit, one of the main reason for passing the WHERE string isthat I do not know how to do the string splitting / parsing and puttingtogether in a Stored Procedure. I bet T-SQL would be just as powerfulas VBScript if I just knew it well enough.What I liked about having built them on the web script was theflexibility allowing to potentially build an advanced search withouthaving to change the stored procedure - but this is not crucial I couldalways write several stored procedures or add parameters to the SP.Here is what I have achieved in this way:User can enter one ore more keywords separated by space.Search algorithm returns results across a number of fields where ALLsearch words are contained in any of these.Search results will always be formatted a certain way and displayed ina html table no matter how the search procedure / criteria is varied.Here is the algorithm (that now works in ASP)1. split search string into separate keywords2. build where condition based on single keyword, concatenating allsearched fields (" AND f1+' '+f2+{' '+f<n>} LIKE %<keyword>%")3. concatenate all these where conditions and pass to stored procedure.4. stored procedure takes care of all other logic (e.g. Joins, whichfields are searched etc.). It uses a string variable @SQL to build thecomplete search string and then doesexecute (@SQL);to create the recordset.I bet there is a way to move 1. 2. and 3. into the SP (and I would feelbetter if it was) but I don't have the expertise to do this. If anybodywants to help me this is very welcome.I can also post my original code to clarify, just want to avoid toolong posts.CheersAxel

View 4 Replies View Related

How To Search For A Given Keyword In Triggers

Nov 10, 2006

Hi



I have a "columnname" and i have 120 triggers defined on tables in my database. I wanted to know as is there any way to find out how many triggers out of these are defined on the "columnname" like if i do any updatesedit to this "columnname" then how many triggers out of 120 defined are fired cascadingly. Also, this "columnname" is mentioned in 43 tables in my database. Let me know if you were not able to get my question.





Thanks!

View 2 Replies View Related

Fulltext Search With Contain Keyword In Server

Sep 25, 2013

I'm using full text search in sql server 2008 with contain keyword.

My issue is while I'm trying

select * from tbl_item_master where contains (ITM_FULLTEXT,'red and white')

above syntax gives me required output but while I'm trying

select * from tbl_item_master where contains (ITM_FULLTEXT,'red and the and white')

above syntax does not gives me output. I'm using system stop list and "the" is noise keyword.

I want to stop searching "the" but want result as per first syntax.

I do get warning " The full-text search condition contained noise word(s)."

Is it possible?

View 1 Replies View Related

Search All Code For Specific Keyword

Mar 14, 2008

This will work on SQL Server 2005 and later.
Since the code is building an XML string, keywords overlapping the magic 4000 character limit are fetched!SELECTp.RoutineName,
'EXEC sp_helptext ' + QUOTENAME(p.RoutineName) AS [Exec]
FROM(
SELECTOBJECT_NAME(so.ID) AS RoutineName,
(SELECT TOP 100 PERCENT '' + sc.TEXT FROM SYSCOMMENTS AS sc WHERE sc.ID = so.ID ORDER BY sc.COLID FOR XML PATH('')) AS Body
FROMSYSOBJECTS AS so
WHEREso.TYPE IN ('C', 'D', 'FN', 'IF', 'P', 'R', 'RF', 'TF', 'TR', 'V', 'X')
) AS p
WHEREp.Body LIKE '%YourKeyWordHere%'E 12°55'05.25"
N 56°04'39.16"

View 5 Replies View Related

DB Design :: Select Row According To Keyword Search

Nov 30, 2015

I have a table name like "WebSearchPage" which contains near about 16 millions records and structure is likeID,  PID, Pagename, Title, MetaDesc, Meta Keyword, BodyDesc..Now I have a input parameter a "Keyword" which can be single or multiple words("Cricket/international cricket").Now I have to check if that input "keyword" is exists in any column(Pagename, Title, MetaDesc, MetaKeyword, BodyDesc) from "WebSearchPage" ..then I have to select that row..

View 3 Replies View Related

Multiple Keyword Search In A Stored Procedure

Sep 8, 2006

 Hi Guys, I hope someone here can help me. I am writing a stored procedure that simply searches for a given value across multiple databases on the same server. So far all well and good.Now, the problem is if the user types in more than one word into the search field.I have put a partial section of code here, there is obviously more, but most of it you wouldn't need to see. SELECT @sql = N'SELECT @count = COUNT('+ @dbname +'.dbo.orders.order_id) FROM '+ @dbname +'.dbo.orders '+
N' INNER JOIN '+ @dbname +'.dbo.customer ON '+ @dbname +'.dbo.orders.cust_id = '+ @dbname +'.dbo.customer.cust_id '+
N' WHERE '+ @dbname +'.dbo.customer.forename LIKE ''%'+ @SearchStr + '%'' OR '+ @dbname +'.dbo.customer.Surname LIKE ''%'+ @SearchStr + '%'''

EXEC sp_executesql @sql, N'@count int OUTPUT', @count = @results OUTPUT Now this code works perfectly well if the user only enters one word, however i need to make sure that the Stored procedure will function if the user enters 2 words, such as John Smith. I need the procedure to search the forename for 'john' & 'Smith' and the same for the surname. It should also work if the user type 'John Michael Smith' - if you understand.I am really struggling with this one.Thanks in advance.Darren

View 2 Replies View Related

Need Links For Multiple Keyword Search Solutions Please

Jun 6, 2008

I have been informed that all my keyword search solutions are susceptible to SQL injection attacks.  Does anyone have links discussing basic ' multiple ' keyword search solutions?  I would think this is a very common routine (perhaps so much so than only newbies like myself do not know it).  I have read the posts about escaping ', doing replace " ' ", " '' ", using parameters and yet every multiple keyword solution I come up with is said to be injection prone.
Example: visitor enters:  Tom's antiquesinto a TextBox control and the C# code behind securely generates the below call to the database.
SELECT L_Name, L_City, L_State, L_Display FROM tblCompanies WHERE L_Kwords LIKE '%' + 'Tom's' + '%' AND L_Kwords LIKE '%' + 'antiques' + '%' AND L_Display = 1 RETURN
I understand that concantenting string parts using an array and then passing the sewn together string to a stored procedure exposes it to injection.  I hope that my single keyword routine below is secure, if it is not then I am not understanding how parameterized SP are supposed to be constructed to protect against injection.string CompanyName;CompanyName = TextBox1.Text;PROCEDURE CoNameSearch @CompanyName varchar(100)AS SELECT DISTINCT L_Name, L_Phone, L_City, L_State, L_Zip, L_Enabled, L_Display FROM tblLinksWHERE (L_Name LIKE @CompanyName + '%') AND L_Enabled = 1 AND L_Display = 1 ORDER BY L_NameRETURN
 

View 5 Replies View Related

Compensate For Keyword Density In Full Text Search

Apr 8, 2008

Hi,

When using FREETEXTTABLE the RANK returned seems to be partially based on keyword density. Has anyone come across a method of compensating for this keyword density so that good matches found in a lot of text and a small amount of text return the same RANK?

For an example look at the site I'm working on when someone searches for "whale watching" - http://www.yougodo.com/Search.aspx?ks=whale+watching - you can see that we are showing poor quality results at the top as our first sort order is based on RANK.

If we could remove the keyword density factor from RANK then this would allow second order sorting criteria to come in to play and move the more valuable results to the top.

Any help, pointers, advice would be greatly appreciated,
Gavin.

www.gavinharriss.com

View 1 Replies View Related

SQL Server 2008 :: Full Text Search - Searching For Keyword

Apr 8, 2015

I am searching for the key word 'Platform Customer Support' using full text search. My code is as below

Set @KeywordSearch = 'Platform Customer Support'

Select AA, BB, CC, DD from SM9..TableName A Right Outer Join SM9_Experiment..TableName C
On A.IncdTouchedGSF like '%' + C.SM9GroupName + '%'
Where
(
Contains(A.[Description], @KeyWordSearch)
And A.OpenTime Between @StartDate and @EndDate
And C.Classification = @GroupNameClassification
)

The code is throwing:

Msg 7630, Level 15, State 3, Line 46
Syntax error near 'Customer' in the full-text search condition 'Platform Customer Support.

View 2 Replies View Related

How To Search A Database For A Key Word Based Search?

Mar 1, 2007

Can anyone tell me how to search an SQL database for a given key word in a textbox? I basically have a database that has a qualifications column and this column needs to be searched for the data given in the textbox. Which is the best method to search for the data? Is it a simple SQL query or an XML based search engine type? Can anyone give any suggestions regarding this? If XML is efficient then how do I use it to query my database, as I'm pretty new in XML based searching.Thanks 

View 5 Replies View Related

How To Make A Search Engine To Search My Database

Nov 22, 2007

hi there,
 i am doing a school project and i need to have this search engine that will search the data that i have stored inside the database and display the results out
can anyone help?
thanks

View 6 Replies View Related

'Keyword Not Supported: 'provider' Error When Connecting To SQL Server Database

Jan 22, 2008

I've run into a bit of a database connection problem. I'm trying to connect to a SQL Server database. It compiles okay, but then while IE is loading, I get an exception error pointing out in the code saying 'Keyword not supported: 'provider'.

View 2 Replies View Related

SQL 2000 MS Search: Boolean Search Doesn't Work When Search By Phrase

Aug 9, 2006

I'm just wonder if this is a bug in MS Search or am I doing something wrong.

I have a query below

declare @search_clause varchar(255)

set @Search_Clause = ' "hepatitis b" and "hepatocellular carcinoma"'

select * from results

where contains(finding,@search_clause)

I don't get the correct result at all.

If I change my search_clause to "hepatitis" and "hepatocellular carcinoma -- without the "b"

then i get the correct result.

It seems MS Search doesn't like the phrase contain one letter or some sort or is it a know bug?

Anyone know?

Thanks

View 3 Replies View Related

Search Database

Jul 19, 2006

Hi All!I have a Table with name "Mytable" and fields as below: Tittle Date Category

View 5 Replies View Related

Database Search

Aug 2, 2007

Hi
I would like to know whether any tools are there to search in a database. Ex. i am using sql server2005 and in my db, more than 1000 tables r there.
i want to search for a perticular column. This search should be on tables, sps, functions, triggers.....etc.
 
If anybody aware of any tool for this or any code in dotnet to develop such tool, pls let me know.
 
Regards
Sanjay

View 3 Replies View Related

Search Database

Jun 19, 2004

I design table which has column "keywords" for keep keywords seperated by comma (,). If user pass one keyword, how can I know that the keyword user select is exactly match with any keyword in field. I mean I just want SQL return only rows that user's keyword is exactly match with at least one keyword in "keywords" column.

Ex.
PK1 Data1 Data2 keywords
1 1 1 apple, orange
2 2 2 mange, orange
3 3 3 mange, apple

If user select keyword 'orange', SQL must return only row 1 and 2.

View 5 Replies View Related

How Search A Value In A DataBase.

Sep 6, 2006

--Author:=> Kapil Choudhary Jaipur (India)
--Motive:- Search A Text value In A DataBase With The Table Name.


create procedure [search_value]
@fstr nvarchar(128)
with encryption
as

set nocount on
declare @rc int --Counter Variable For The Cursor 1.
declare @rcc int --Counter Variable For The Cursor 2.
declare @tc nvarchar(128)--TABLE_CATALOG.
declare @ts nvarchar(128)--TABLE_SCHEMA.
declare @tn nvarchar(128)--TABLE_NAME.
declare @tt nvarchar(128)--TABLE_TYPE.
declare @Ctn nvarchar(128)--Column Table Name.
declare @Cts nvarchar(128)--Column Table Schema.
declare @Ccn nvarchar(128)--Column Column Name.
declare @Cdt nvarchar(128)--Column Data Type.
declare @currow1 int--Total Row Count For The Cursor 1.
declare @currow2 int--Total Row Count For The Cursor 2.
declare @str nvarchar(128) --Dynamically Created Query String.
declare @strresult nvarchar(128)--Value Stored From Temp Table.
declare @findwhat nvarchar(128) -- String To Be Searched.
set @rc=1
create table #temp (colval nvarchar(128))
create table #myresult(Table_Name nvarchar(128),Column_Name nvarchar(128),Column_Value nvarchar(128))
declare mycur1 cursor static for
select TABLE_CATALOG,TABLE_SCHEMA ,TABLE_NAME,TABLE_TYPE
from INFORMATION_SCHEMA.TABLES
where TABLE_TYPE='BASE TABLE'
open mycur1
set @currow1=@@cursor_rows
--print 'table rows = '+str(@currow1)
while @rc<=@currow1
begin
fetch next from mycur1 into @tc,@ts,@tn,@tt
declare mycolcur cursor static for
select TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME,DATA_TYPE
from information_schema.columns
where TABLE_CATALOG=@tc and TABLE_SCHEMA=@ts and TABLE_NAME=@tn and data_type in('char','varchar','nchar','nvarchar')
open mycolcur
set @findwhat='wa'--Your Search Value Here
set @rcc=1
set @currow2=@@cursor_rows
--print 'table col = '+str(@currow2)
--print 'Table name'+' '+'owener'+' '+'Column Name'
--print '-----------------------------------------------'
while @rcc<=@currow2
begin
fetch next from mycolcur into @Cts,@Ctn,@Ccn,@Cdt
-- print @ctn+' '+@cts+' '+@ccn
set @rcc=@rcc+1
set @str='select '+quotename(@ccn) + ' from ' +quotename(@cts)+'.'+ quotename(@ctn) + ' where ' + quotename(@ccn) +' like '+char(39)+@findwhat+char(39)
set @str='insert into #temp(colval) '+@str
--print @str
exec (@str)
if exists(select * from #temp)
begin
select @strresult= colval from #temp
--print 'colval =========>>>>> ' + @strresult
delete from #temp
insert into #myresult(Table_Name,Column_Name,Column_Value) values(@ctn,@ccn,@strresult)
end
end
close mycolcur
deallocate mycolcur

set @rc=@rc+1
end
--print @@cursor_rows
select * from #myresult
close mycur1
deallocate mycur1
drop table #temp
drop table #myresult
set nocount off
Go

View 1 Replies View Related

Search Database Tutorial?

Jul 1, 2007

Do someone know good tutorial on web with examples for search data from SQL database?

View 2 Replies View Related

Search For Tables In Database

Jan 22, 2008

 well i am using vb.net and would like to know how to search a specific table in the databasefor egif  table1 exists in database then drop table1end  if ...something like that

View 2 Replies View Related

How Search PDF File In The SQL Database ?

Jun 22, 2005

Hi guys, Now I  upload the PDF file and store it in the database as binary.  But  now I need to search the text in the PDF file. Is there any way I  can search the content  in the database ?   Anyone has any idea about it ?Thanks!Regards,Sam

View 9 Replies View Related

Can Anyone Help Me With Connecting To A Database To Search?

Mar 22, 2006

I'm trying to make this piece of code work, I get all of it except how I get the data from the database, what I wish to do is. On page load I wish to take the value of a querystring in the page URL called ProductID and search a database to see if it exists in a specifical table and column, if it exists I wish to make a button not visible. the code I am using is:
 
#############
 
protected void Page_Load(object sender, EventArgs e)
    {
// Get the querystring value
        String inQueryString = Request.QueryString["ProductID"];
       
        // Get the data from the database, using the above value
        DataTable data = ??
  
The datasource I want to connect to is SqlDataSource1, and the table I want to search is “Reviewsâ€?. I want to search in the column “ProductIDâ€? and search for the ProductID from the URL query string above.
       
        // Did we find a product in the database?
        if (data != null &&
            data.Rows.count > 0)
        {
            // Code to display the product's information
           // We found a product, so we need to hide a button
            Button5.Visible = false;
        }
       
   
        }
 
##########################
 
Please can somebody fill in the missing bit for me so i know how it should be, i've searched the quickstart tutorial on the menu above and I still don't understand it, as it doesn't show anything like what I want to do, and I have looked at numerous websites about the matter. If you don't have time that is okay, but If somebody does have the time to show me what I need, I would be very greatfull.
 
Regards
 
Daniel coates

View 1 Replies View Related

Search A String Throughout The Database

Mar 8, 2006

Hello
I have a Database which contains like 1000 Tables.
I am not the designer of that DB.So I need to in which table and which column
that string exists. IS there a DBWIDE String search possible?
Thanks and Regards

View 8 Replies View Related

Search Database Maintanance

Feb 15, 2007

Is there any speicial considerations when you prepare the maintanance Plan for the Search Database.

View 3 Replies View Related

Dropdownlist Database Search

Mar 19, 2008

Hi all.

I have a huge problem that ive been sitting with for awhile.

I have a web page with 4 dropdownlist boxes on it

Gender:
Race:
Field:
Location:

Now a user can search a SQL db from selecting values from these 4 dropdownlist boxes which are equal to values in the db obviously.

when they have done that and pressed submit a Gridview is populated with the people corresponding details and the user is able to view each row seperately.

Now the problem i am having is that when i havent used all 4 selections for eg

Gender: null (no value selected)
Race: Black
Field: Accounting
Location: Los Angeles

then no information is returned from the db in the gridview.
im using a sqldatasource to populate the gridview and here is the query string that i am using :


Code:

sql
SELECT [title], [gender], [initials], [name], [surname], [birthdate], [postaladdress], [suburb], [city], [zipcode], [criminalrecord], [drivers], [maritalstatus], [dependants], [citizenship], [province], [contactref], [hometel], [cell], [jobtitle], [relocate], [emmigrate], [email], [worktel], [enddate], [startdate], [FIELD], [education], [company], [positionheld], [jobdescription], [contactperson], [contacttel], [startdate2], [contactperson3], [jobdescription3], [positionheld3], [company3], [enddate3], [startdate3], [contacttel3], [other] FROM [cvinformation] WHERE (([race] = CASE WHEN @race IS NOT NULL THEN @race ELSE [race] END) AND ([province] = CASE WHEN @province IS NOT NULL THEN @province ELSE [province] END) AND ([education] = CASE WHEN @education IS NOT NULL THEN @education ELSE [education] END))



what i want to do is whether the user doesnt choose any selection and leaves the choice null that ALL the information in the table of the db be shown and even if they only choose 2 values and leave the others null then it still brings back the information from the criteria chosen..

Is this possible.?

View 8 Replies View Related

Database Search Engine

Jul 9, 2004

Hi folks,
Whts up........??? M back, after a long gap.
I have come across with a major issue. And u know wht th issue is.........???
It is about th DATABASE SEARCH TOOL. I have a database of around 30 tables. Now I wud like to have aa search engine on my .asp page. There will be a text box on th page and one submit button. After typing some text in th text area n submitting th page, my package sud check tht perticular text in all th COLUMNS of all th TABLES, n whrevr it gets a match (exactly same, or by speech recognition), it sud through th links on th next page.

Nw i wud like u guys to take this problem, at th earliest n come up with a up to th mark solution.

Thnkx

View 12 Replies View Related

To Search A Record In A Database

Aug 26, 2004

Hi,
I have a sql server database with 250 tables in it, i wanted to find one particular value from one of the tables in the database. How to find that appreciate your help..
Thanks

View 1 Replies View Related

Search A Word In Database

Nov 24, 2006

Hi I was wondering if anyone can help me out here. I want to search a word in the database which has more than 80 tables is it possible to search all the tables at once for that word.

I am using SQL2005.

Thanks in advance.

View 2 Replies View Related







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