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
ADVERTISEMENT
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. han i compare the values in the original table and the temp table.All i want is the values that do not match
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
I have an Access database which asp pages use which has a number of fixtures and events which take place on certain days, and I want to select all values from the database which occur over a period of a week.
For example, for this week I'd want to select all items which have dates between Monday 26th November and Sunday 2nd December. Code:
View Replies
View Related
I have a form where the user selects their EmployeeID from a DB populated dropdown list. Then they fill out some other information and submit the form. I would like to make it possible that when the user selects their EID, other DB information tied to that EID is displayed on that page (Name, Phone #, etc), so that when the EID is selected, the employee can see their name and info, before the form is submitted.
Is it possible for JS/DHTML to show which value is selected (without posting the form) and then use that variable to call the additional information from my DB using SQL? I would probably then show that value using <div> or something.
Sorry, I am familiar with ASP/VBScript & SQL, but I don't know a ton about Javascript. And I don't think what I want to do is possible with only ASP, unless I post my form to another page, and then that page post the final submission for the form... I'd rather keep everything on one page, then submit the form.
View Replies
View Related
This may seem like a silly question but i am now trying to get my data from my oracle database. This is going okay but i have the issue that when i have blank data in some of my fields, when i select it and out it in a table it doesn't seem to read them correctly
This is my asp code:
View Replies
View Related
I use a multi-select menu in an ASP so the user can pick several values.
<select multiple name="lbErrorType" size="12">
However, after I have saved the records to the DB, and the user comes back
to edit a prior record, I re-populate the multiple select box and do a
"<option selected>" for each record that is saved to the DB.
<option selected>
But only the last value is selected !?!?
How do I get the select menu to select ALL the appropriate values ?
View Replies
View Related
I was wondering if you could help me with the following problem. I have 2 listboxes in my
webpage, 1 has cities, and the other lists the streets of the city from the first listbox.
When I click on a city, I want the 2nd listbox to populate with all streets in the city. The city and streets are saved in a database, so when the user selects the city, I will run a query on the database and populate the 2nd listbox with all streets.
How can I do this with normal ASP? I know how to do this with ASP.NET, but don't know how to activate this with normal ASP?
View Replies
View Related
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
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
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
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
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
View Related
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
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
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 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
I've got a WYSIWYG editor, that runs off a template page (i.e. template.htm) that gets opened in an iFrame for editing.
How can I get it setup so I cange the template at the click of a button? I've tried doing a form with radio buttons, but can't get it to work.
For example, the iframe source has been set to "strTemplate". My form processing was along the lines of:
<%
If request.form "template" = "template1" then
strTemplate = "template1.htm"
Else
strTemplate = "template.htm"
If request.form "template" = "template2" then
strTemplate = "template2.htm"
Else
strTemplate = "template.htm"
End If
End If
%>
View Replies
View Related
I have a list box which has the following values:
Car
bike and Boat
If I select "car" it is fine but when I select "bike and boat" it just takes bike
as the selection. It is taking the space as the end of the string. Is there a way I can
rectify this?
View Replies
View Related
My boss wanted me to add a dropdown to this form. I was able to add in the dropdown and it inserts into my database (Access) just fine. However, I have an edit page also and this is where my trouble comes in.
On the edit page, the dropdown does not "know" which specific option was selected. I tried to write an If statement but I think there is something wrong in my syntax. Code:
View Replies
View Related
I have undertaken a website revision project after not programming for about 6 years. I am beginning to set up a work environment on my pc, and have questions about the software being used verses what could be the ideal software.
I am familiar with classic asp pages, not asp.net. I am also familiar MS Interdev (but am unable to locate my copy and cannot find a torrent file - is this an archaic program now?). The last thing that I'll mentioned is that I prefer to have a debugging capabilities.So the current website uses Dreamweaver 8.0, IIS 6.0, and MSSQL 2000. Question.Given my background, what software would you use to set up a work station?
View Replies
View Related
i need to extract some data from a table called accountantsBids. I want to select the last entry for every accountant based on the date descending.
Table:
entryid = Autonumber
Accountantid = FK
DatePosted
I've tried TOP 1 but that doesn't do it - it only gives one recordset. What would be the best way to get this working.
View Replies
View Related
I have a database with date of gigs in it and am trying to select * from the database the next gig basically, and am compariung against todays date and saying select * more than todays date. Is this right, cause it's not doing it? Code:
dateN = Date()
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "************"
set recsetS= server.createobject("ADODB.Recordset")
sql = "select * from admin where dated > "& dateN &" order by relevance DESC "
recsetS.open sql,conn,3,3
View Replies
View Related
I created a form for Deleting multiple records (from Access db )using checkboxes. However, I would like to add a link or button that would check mark all the checkboxes since I could have hundreds of records.
What is the best way to go about it. Does anyone knows of any samples other than Javascript.
View Replies
View Related
I was wondering if anyone has a moment to look over some code I've written?
I'm involved in the maintenance of an old CMS system I wrote a number of years ago, when I was regularly coding in ASP. These days it takes a while to mobilise the grey matter when it comes to ASP.
Anyhow, basically I am trying to select a specific node and determine the id of the last child of the parent node.
At the moment, I am only returning the first childs id, despite my best efforts. Code:
View Replies
View Related
On the online crm system i've built (using ASP) our customers can create a list of contacts and download/delete/add to this list when they want to and then go and view the list. It will display 20 on a page with forward/back buttons etc.
I have written a routine which queries the MS SQL 2000 database and retrieves all the IDs of the contacts. It will then work out the page it is on and display the appropriate records by reading through the 20 IDs for that page and query the data from each ID it needs to display on the screen.
This works fine for lists of up to 1000-2000 but when it gets to 5000, 10000 records it becomes an issue of performance as it will hold in a variable all of those 5000 or 10000 IDs. There has to be another way of doing this.
View Replies
View Related
I want to select just one field to display using sql and I want to have another variable that counts how many fields of the same value there are. My code looks something like this but i'm getting an error...
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal. Code:
View Replies
View Related
Is it possible to select random images from a directory without creating a "library"
As in I want to have a directory with 25 or so images and want to randomly select an image without having to change the txt document when I add new images.
View Replies
View Related
This is my page that displays a certain players games played below. It sorts by games played and excludes all records that = 0. Now with 9 different grades to show i did not want 9 different pages, so i added in 'strSortGames' so that they can select which grade to view and only one page is needed.
I used a menu (list field) on a previous page to do this, do you no a better way to do this? e.g Text links or some other way? or is a list field a fairly good way? Code:
View Replies
View Related
What query would I have to use to select entries from a database where there first letter is a letter of the alphabet? ie. Select all entries starting with an A etc.
View Replies
View Related
I need help programming a search function. I want to narrow down a search function regarding time. I figure the best way to do this is to select a higher interval and a lower interval, and then have an sql function that grabs the times from within that range.Code:
sql = "SELECT DISTINCT place, time FROM bussystem WHERE time >= '"&timey&"'"
Set rscurrent = Server.CreateObject("ADODB.Recordset")
rscurrent.Open sql, conn, 3, 3
sql = "SELECT DISTINCT place, time FROM bussystem WHERE time <= '"&timey&"'"
Set rsrecent = Server.CreateObject("ADODB.Recordset")
rsrecent.Open sql, conn, 3, 3
View Replies
View Related
Is it possible to select all twelve months in one select query either from a single field name or through an alias name?
I have a field name that conatins dates, and I would like to arrange the value of each month in a grid, jan-dec, monday-saturday. can I accomplish this with one select statement using an access db?
View Replies
View Related
I need Help in inserting the user image in my data base. but
unfortunatly I don't know how.I'm using asp with sql server. I tried to
insert the image and i geuss it worked.for the field in the db in not
null and it have this value <Binary> . but when i try to select it in
gives me this error "An unhandled data type was encountered".
this is my code :
View Replies
View Related
I am trying to set up a component that will allow events that are date sensitive. From this date to that date. What I am trying to do is use drop down menus for selecting the dates, and I am having a hard time finding out how to build these drop downs so when someone is editing an event, the existing dates are pre-selected in the drop downs. But I need to seperate year, month and day for both and then have it change the value of the correct option to selected.What is the easiest way to do this?
View Replies
View Related