Exact Match Query

i want to provide exact match. e.g. if user enters pharma machine result only display records containing pharma machine and not records containing either pharma or machine.

database table: company_info

database field: products

user entered search (field name): st

i had tried the following

select * from company_info where products like '"&st&"'

but is shows the wide result

View Replies


ADVERTISEMENT

Sorting Query By Match %

If i am querying from a database with code like: Code:

Set oRs=server.CreateObject("adodb.recordset")

strSQL = "SELECT * FROM tblInfo WHERE Name = '" & request("name") & "' OR State = '" & request("state") & "' OR Zip = '" & request("zip") & "' "

oRs.Open strSQL, conn

Do while not oRs.EOF

Response.Write "<tr><td>" & oRs ("Name") & "</td><td> " & oRs ("State") & "</td><td>" & oRs ("Zip") & "</td>

oRs.MoveNext

loop

how can i diplay the results that match all three catories before partial matches?

View Replies View Related

DELETE Query Does Not Find Match

I have a query that accepts input from a form and deletes a row if the form input = the value in the table .if the input is not in the table how do i post to the user that this data was not found in the table?

View Replies View Related

Exact Value Name

I'm uploading a file locally and I'm trying to passing it throug a variable and I'm having a problem with locating the exact file name from the upload_document page. I thought is was "r_title" but for some reason the file name isn't stored there.

View Replies View Related

Set Exact Time

im defining a cookie as so:

Response.Cookies("something")("value") = "value";

now i want it expire in 20 minutes.. how do i do that? i tried to give the .Expired property a date object but it faild.

View Replies View Related

Exact Matches

I am using ASP to query access db on IIS5
I need to find exact matches for search terms within a string. EG "cat" will find cat but not catastrophe from within a large string.
I cannot use "=" as that would match the whole string and I only want to find the exact match within the string.
I am trying "like '%[!a-z][search term][!a-z]%'" which is pretty clumsy and also doesn't pick up the search term if it is at the beginning of a sentence.
Can anyone help me with the syntax here? I have racked my brains coming up with all sorts of convoluted solutions that all end up having a flaw. I have been looking around ASP fora and it seems a few people are asking the same question but getting no answers. (you might see my question in some of them...) I am sure there must be some operator within sql as there is in FMP but I cannot find it.

View Replies View Related

Exact Search

regarding EXACT search. i want let user search with ANY or EXACT match. i had done any with

instr(products, '"&st&"') > 0

where products is my database field, from where search result come and st is the search string entered by user. now want to provide EXACT search. e.g. machinery will match only machinery and not machine, machineries, machines etc. i had tried LIKE predicate. is there any other way to provie EXACT match ?

View Replies View Related

Search Using EXACT EXPRESSION

i m doing a custom search. i have included SEARCH USING:

1. ALL OF THE WORDS
2. ANY OF THE WORDS
3. EXACT EXPRESSIONS

i m not able to have the search results using option no. 3 EXACT EXPRESSIONS. how to do that thing ?

View Replies View Related

Make Match

I want to know how to make a match for a text , for I'm wan't to search for this in the db . the search i made search only for the exact text user inserted so if the user misspelled the word the search will give him zero result. So i want to seach for any part of the word or if it is aword in aphrase.

View Replies View Related

Order By (number/number2) Not Exact

Here's the problem I'm running into:Code:

Set RS = Conn.Execute("SELECT TOP 10 id, score, numvotes FROM [user] WHERE active = '1' ORDER BY (score/numvotes) DESC")
Simple query, nothing to fancy. However it doesn't order highest to lowest correctly. Here's a sample output:

10.00
10.00
9.63
8.00
8.25
8.00
7.00
7.82
7.42
7.86

As you can see it's not correctly ordered from highest to lowest.

View Replies View Related

Database Exact Keyword Search

i am doing a database search project. and i would like to know how do i get exact keyword searched from the database. for e.g. if the user enters keyword as "lan" to be searched it should return only records that contain exact keyword "lan" and should not return "plan" and other words like that.

View Replies View Related

Selecting Values That Do Not Match

hi there i need to display results that do not match those in the database. I have an excel file and i upload it, inserting the records in a temp table. Than i compare the values in the original table and the temp table. All i want is the values that do not match..i did this:Code:

sql = "SELECT TempSerial.SerialNo "&_
"FROM TempSerial, Serial WHERE TempSerial.SerialNo <> Serial.SerialNo "&_
"OrderBY TempSerial.SerialNo;"
Set RS = objConn.Execute(sql)

i displayed the records with <%=RS("SerialNo")%> but i get all the records in the temp table displyed.

View Replies View Related

Check Passwords For Match

part of this code works but it seems to ignore the password check, any ideas?

If Request.Form("PuafoPassword") = Request.Form("RePassword") Then
strError = strError & "Passwords don't match.<br>" & vbNewLine
Else
If rspuafo.EOF and rspuafo.BOF Then
Response.Redirect ("thankyou.asp")
Response.End
Else
strError = "Username already exists, please choose another one" & vbNewLine

View Replies View Related

Multiple Variable Match

I have a web page programmed in ASP that creates a calling list based
on the user's preferences, which queries the information from a SQL
2000 database. I want the user to be able to select whether to create
different lists based on time zones or one list with all time zones.

The user should be able to mix and match time zones. However, I'm not
sure how to do this task. An example would be that the user wants
east coast and central in one file, then pacific and mountain in
another, but it could also be pacific in one and east and mountain in
another, and the possibilities go on. The database is set up with all
the information needed, but I'm not user how to code in ASP for the
different possibilities.

View Replies View Related

State Reason For No Record Match

I have a form on a .asp page that when submitted via post to itself its values are grabbed by asp and put into an sql statement. From there the records are generated depending on the criteria selected in the form. What I would like some help or guidance is if no records match the criteria how can I generate a meesage that states which criteria in the request did not match.

So if the form submitted is looking for a home in Michigan, Ranch Style, with 2 car garage, 3 bedrooms, 2 baths, between 1000 to 1500 square feet and there is no record that matches that criteria a response is given that the reason for no match is because the 2 bath criteria didn't match or because the 2 bath and the square footage criteria didn't match.

I have the form working with asp already. When there is no record I have a simple statement that says "sorry, no homes matched your criteria" I would like to state why there was no match.

View Replies View Related

Read Excel And Match With Database

can any one help me to read the datas from the excel sheet and match it with the database.i will be thankful to you if u provide me a sample code.

View Replies View Related

I Need A Code That Resizes The Images On My Site To Match Resolutions

I want the site to look the same on all browsers. All the tables and stuff are based on percentages but this doesn't fix the images. The images are based to fit 1024x768 but i want them to look the same on every other resolution. Can someone help me with a script?

View Replies View Related

Whats The Exact Error For "system Cannot Find The File Specified"

i get "system cannot find the file specified" error. iam sure that the path of file iam looking for is true. i guess this is a friendly message thrown. when i turned off the freind messages in IE (client side) i still get the same error. is there any way that i can see the exact error so that i can debug.

View Replies View Related

Need To Convert This Sql Query For Access To Identical Sql Query For Sql 2005..

My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"

I have this code, working fine in access 2003

SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"

but get the following error when I run it against my sql 2005 database.

[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.

I don't know the corresponding t-sql for the query.

View Replies View Related

Query A DB - Pass The Query To Next Page

I am running a querry on an access database and have set the number of records/page displayed at 20. if there are more than 20 records returned, then 1st page will show the first 20, the next page will show next 20 and so on....

The trouble:

the count of total records displayed is correct and the first page is displayed correctly. But when i click on *Next* to go to the next page, all the records of the database get displayed (not the 2nd page of records from the query).

View Replies View Related

Query Access With Multiple Query

I am using ASP/MS ACCESS to see how I can query the same database, via 2 formfields.

{name: - search}Textfield 1: - Search by Category
AND/OR By
{name: - searchT}Textfield 2: - Location

Currently,

strSearchwords = Trim(Request.QueryString("search")); where "search" is the name of Textfield1

Which is fine, but how can I set it so that on Submit, the string from search, and searchT are somehow joined together into one string?

View Replies View Related

ASP LIKE Query Using Parameterized Query

In Access you use "*" + [passed variable] + "*", + can be replaced with &
Calling a parameterized query in Access requires % be used in place of *,
however, all that I have read show dynamic SQL passed to Access:

WHERE [some column] LIKE '" & ASPvar & "' % ORDER BY ...

However, my call is similar to:

conn.qMyLookup strVar, rs

If I modify the query in Access to:

"%" & [passed variable] & "%"

I get all records. If I only put it at the end, as suggested, I only get
matches at the end, not throughout the column. Code:

View Replies View Related

Sql Query

Is it possible to write sql query to fetch records from
specific record number?

lets say i have one variable and it stores values such as
1,2,3 or so...

if variable contains, i want to fetch records from 1 to
20.
if it contains 2, then records should be from 21 to 40.

for 3, records would be 41 to 60...

what could be the sql for that?
i dont wannna fetch whole table and then filtering
through code..

View Replies View Related

Sql Query

i have a table called checkrenewal
it has a field called date_renewal

data is stored like this

03/20/2007
05/17/2008
10/21/2006
09/18/2006
09/04/2006

so what i want to do is display only records that are in month of sept for 2006
so there will be 2 records

so next month is Oct 2006 so only display one record

so depending on which month and which year it is display only those records.

View Replies View Related

MORE Sql Query

I can't write the sum of a certain colum in a table of a db.

<%
sql_Sum_Tax="SELECT SUM(vtax) AS sql_Sum_Tax_RS_Var FROM orderstats
WHERE vcompletedate BETWEEN "& startDate &" AND "& endDate & ";"
Set sql_Sum_Tax_RS = Server.CreateObject("ADODB.Recordset")
sql_Sum_Tax_RS.Open sql_Sum_Tax, conn1
%>

<%=sql_Orders_Placed_RS("sql_Orders_Placed_RS_Var")%>

That last line generates this error:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

View Replies View Related

Sql Query

i have a table and the fields are

gender
weight
points

the records for example are

Male 55 2.0
Male 60 3.12
Male 65 3.87
Male 70 3.99

so i need to find out the points when the user selects gender and enters the weight

people are allowed to enter weights between 55 and 70

say for example someone enters weight as 55 his points will be 2.0

if someone enters weight as 64 i want the points to be 3.12

View Replies View Related

SQL Query

I have an Access database of literature that I want to search using an ASP page using multiple search criteria (author, title, year, discipline,etc).
I'm using a form to collect the criteria from the user and then sending it to an ASP page. I'm creating the SQL statement using variables that pick up values passed from the form.

Code:

strSQL = "SELECT * FROM Literature WHERE " & _
"(Author Like '%" & mauthor & "%') AND " & _
"(Title Like '%" & mtitle & "%') AND " & _
"(Journal Like '%" & mjournal & "%') AND "& _
"(ArticleBook Like '%" & mBookOption & "%') AND " & _
"(Year Like '%" & myear & "%') " & _
"ORDER BY Title ASC;"



This would probably work if I used "OR" in my SQL, but I want to be able to use "AND." My problem is that I'm not getting records that have null values in some of these fields.

View Replies View Related

SQL Query For Mdb

Ive been working with queries through asp on a mdb file. The biggest problem i have is
that when i query a certian column that had embedded hyperlinks in it, the query also
returns the value of the hyperlink. Is there any way not to have to remove the hyperlinks
in the database and not have them show up on queries? Code:

View Replies View Related

ASP And DLL's Query

I am learning ASP from the Wrox Begining E-Commerce book, which uses Visual Basic to create a DLL and it also uses MTS as well.
I have been trying to find hosting not realising the problem with registering custom dll's on server and know realise that this isn't the best way to do this.
I wanted to know if there was anything i could do to change this. I have read a little bit about the Global.isa file but am not sure about this.
Could i just transfer all the code into the global.isa and then use it like this.
My website access a sql database and uses a mts pipeline for order processing.
I don't have enough experience of ASP to re-write this code and am not sure of what to do.
I have tried searching the web but am not really finding any solutions that I understand.

View Replies View Related

Sql Query

I have one table with date field in sql server2000.I want to write one sql query statement that fetch last three months data from the current month..

View Replies View Related

SQL Query

I am trying to have the SQL query select from a table where two conditions exist.
The line:

Code:

SQL = "SELECT * FROM CompsIn WHERE Out = -1 "


Works, but I want to have it also select from compsin where UserGroup = Session("UserGroup")
Until I connect the login and the CompsOut pages,adding Where UserGroup='CSU836'
will work just fine.

View Replies View Related

Query Help

i have a table called Cars which has fields like this

Car_Id
Purchase_Date

Purchase_Date has datatype as datetime in sql server

i have 2 fields on the form where the user enters the year and month and then submits the form on the next form i get the year and month like this

year=2005
month=02


i want to fire a query to get the car_id

View Replies View Related

Sql Query

i have numbers in a column say

124
2345
1356
4569

and say 4569 belongs to joseph i want to tell what josephs rank is looking at the values his rank is 1
if 124 belongs to justin then his rank is 4
the more the points the higher the rank can someone tell me how my sql query will be

View Replies View Related







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