Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SQL Statements in a Database Search

Reply
Thread Tools

SQL Statements in a Database Search

 
 
Bill
Guest
Posts: n/a
 
      07-15-2003
I can't believe I can't find this answer on Google... I'm trying to build a
database search query. User enters a search term into a box, and so I'd like
to use that string to search a column in a database.

So, something like

SELECT "column_name"
FROM "table_name"
?SQLcommand? (parm1 and parm2 and "phrase phrase2")

So, if the site visitor entered
parm1 and parm2 and "phrase phrase2"

in the search box, what is the proper ?SQLcommand? to get this to be a good
search engine for my database?

ba


 
Reply With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      07-15-2003
Can YourInput equal something like
dog AND cat OR "bird house" ?




"Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
news:(E-Mail Removed)...
> huh?
> You mean:
> "Select * from tablname where field1 like '%" & YourInput & "%'"
>
>
>
> --
> ----------------------------------------------------------
> Curt Christianson (Software_AT_Darkfalz.Com)
> Owner/Lead Designer, DF-Software
> http://www.Darkfalz.com
> ---------------------------------------------------------
> ..Offering free scripts & code snippits for everyone...
> ---------------------------------------------------------
>
> "Bill" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I can't believe I can't find this answer on Google... I'm trying to

build
> a
> > database search query. User enters a search term into a box, and so I'd

> like
> > to use that string to search a column in a database.
> >
> > So, something like
> >
> > SELECT "column_name"
> > FROM "table_name"
> > ?SQLcommand? (parm1 and parm2 and "phrase phrase2")
> >
> > So, if the site visitor entered
> > parm1 and parm2 and "phrase phrase2"
> >
> > in the search box, what is the proper ?SQLcommand? to get this to be a

> good
> > search engine for my database?
> >
> > ba
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      07-15-2003
Bill wrote:
> I can't believe I can't find this answer on Google... I'm trying to
> build a database search query. User enters a search term into a box,
> and so I'd like to use that string to search a column in a database.
>
> So, something like
>
> SELECT "column_name"
> FROM "table_name"
> ?SQLcommand? (parm1 and parm2 and "phrase phrase2")
>
> So, if the site visitor entered
> parm1 and parm2 and "phrase phrase2"
>
> in the search box, what is the proper ?SQLcommand? to get this to be
> a good search engine for my database?
>
> ba


You need to further define your requirements. When asking for query help,
always provide your table structure, some sample data, and the results you
wish your query to return given the sample data and parameters provided.

Bob Barrows


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
if statements and case statements questions John Crichton Ruby 6 07-12-2010 06:17 PM
Prepare Statements VS Statements Vince Java 12 01-21-2008 01:18 PM
component statements within architecture statements Neil Zanella VHDL 8 10-20-2006 09:05 AM
if statements with or w/o else statements Harry George Python 6 02-23-2004 06:48 PM



Advertisments