Using Two Fields

I have a database table and I am building a search-like page which is supposed to pull information from the database based on the following. "Get records where field1 is 30% (or more) higher than field2 within a specific time period". Should these records be chosen by the SQL query itself?

Or should I get all the records within the time period using GetRows, and loop through them checking whether or not it fits the criteria? While I certainly feel more capable of the second approach than the first, I am not sure if its the best way when large numbers of rows are involved.

View Replies


ADVERTISEMENT

2 Fields

I have 2 fields in my database. One is startDate one is endDate. I want to display records according the current date. So far I can select all records where the startDate is greater or equal to now by using
Code:


SELECT *
FROM items
WHERE itemDateStart >= now

It seems the BETWEEN claus only accepts value, not fields.
So basically I want to select * from items between itemDateStart and itemDateEnd

View Replies View Related

Key Fields

I have a need to be able to identify which fields within a database are key fields.I did find the Attributes property of the Field object contains information for a field in a recordset. One of those values for the Attributes property is identified as adFldRowId which should identify whether the field is used as a key, but it doesn't seem to work. I'm currently reading off an Access database.Does anyone have any insight in being able to identify key fields within a recordset?

View Replies View Related

Getting The Sum Of 3 Fields

I have set up my database with 4 fields (num1, num2, num3, sum), and have created a form with 3 fields to insert 3 numbers. That part is easy.My problem is when i submit these 3 numbers (5, 7, 6) i want the form/script to add these numbers together and insert it into the 4 field "sum".

View Replies View Related

Creating Fields

I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.

That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.

View Replies View Related

Adding Different Fields

Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value

How would I add those to fields? It may be my inexperience but when I
tried something like

rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value

didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.

Suggestions?

View Replies View Related

Displaying Appropriate Fields

I have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).

I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?

View Replies View Related

Joining Two Fields

how would you join the two felds from a table in the database so it can show the image from joining the two fields to know wherethe image is coming from
Quote:
<img src="<%=(rs_lprojects.Fields.Item("image_folder_path").Value)%><%=(rs_lprojects.Fields.Item("image_src1").Value)%>" />

View Replies View Related

Skipping Fields

I have been writing out the general steps
I want to do in plain english before writing ASP.
The values come from a customised data grid (not in .NET) that is
generated according to what fields need to be recorded for that record.
What I want to try and do is as follows:
- Read form fields into input array (skip first three values :
savevalues, userid, productcode) - Save last value of every row (add to
quantity for extra info) - rest of processing
Is the first one even possible using plain ASP? I remember being able to
do it using Javascript, but I couldn't get it to work properly.
I have tried to use Arrays in ASP before, but without much success.

View Replies View Related

Insert Into All Fields

is there a way to write a insert statment with out typing out all of my field names? i want to do an insert in every field but i don't want to have to write them all out.

View Replies View Related

Copy Value From Fields

is it possible to copy the value from fields in form1 to fields in form2 without submit the form??form1 and form2 are in the same page. if it's possible hoe to do that??

View Replies View Related

Populate Other Fields

I have an ASP web form that I want to populate fields based on the first
field choice. Example I have 4 fields item, price, delivery, availability. I
have all these items setup in an access table. When a user chooses an option
from the item drop down, the price, delivery, availability will then
populate. I have already made my connection to the database, and created the
drop down for field one from the choices. How do I now populate the
corresponding fields.

View Replies View Related

Sorting On Fields ?

I created a script which suppose to sort on 2 fields. Everything works fine with no errors except when I click on the field that suppose to sort the data it does nothing.

This is the code: Created on test table name Reports2 3 fields id, r_date, r_doc_title

Code:

View Replies View Related

Autonumber Fields

I'm creating a basic ASP guest book, keeping my guest book entries
in a Microsoft Access database, and using ADO to access it. My problem is
that I am using the autonumbered ID field to split my guestbook into pages
of 10 entries. It works for the most part, but if I delete an entry, a gap
is left in the records and I end up 9 entries instead of 10 on that page.
Basically I need a better way of sorting this out - I thought of SELECTing
all the records into an array first and then working from that, but I can't
get array to be dynamic enough in VBscript

View Replies View Related

Read Only Fields

How can I make all the fields on my form read only based on a users logon account? I have field in my Microsoft Access table that is yes/no for read only access. Now how do I read from that field and code my ASP file.

View Replies View Related

Table & Fields

I'm creating a On-Line Order system and have got for the most part all done. My question is:
I have one table that I'm having all the orders entered into. As each order is entered in it assigns a record number. Since we have over 2000 item to purchase I don't want to create that many fields.
Is there a way that when they approve there order and I have it enter it into the orders table that it will create field automatically?
Each item has three information points (Item Number[itemnum], Description[desc], and Quantity[qty]) that needs to be added for each item they order.
I don't want to create a record number for each item that they are ordering

View Replies View Related

Comparing Two Fields

Is there a way to do the following select (like in Dlookup?)

SELECT Permit_No FROM Table1 WHERE Table1.Address like Table2.Address

I want to get Permit_No from table1, but its WHERE condition depends on comparing two address fields in different tables. Will that work?

View Replies View Related

Order By Two Fields

can i set a list of users to be ordered by two fields soo
This:
user 1
user 2 Admin
user 3
user 4 Admin

Becomes

User 2 Admin
User 4 Admin
User 1
User 3

orginal

Code:

strSQL = "SELECT [username], [ID], [email], [admin], [suspend], [Timestamp], [last_login] FROM tblUsers ORDER BY username"

View Replies View Related

Converting Fields

I am trying to get values from our database which are in a single field, into seperate variables.

I have a field called locations, with multiple values example... "East Sussex, London & Home Counties, Scotland"

I would like to get each of these into seperate variables e.g.

variable 1 = East Sussex
variable 2 = London & Home Counties
variable 3 = Scotland.

I guess it will need some sort of regex to detect number of commas, then a loop or something.

To make things slightly easier, none of the values in the locations field have commas inside them.

View Replies View Related

Summing Fields

I have a table with 5 name fields (n1, n2, n3, n4, n5) and 5 time fields (t1, t2, t3, t4, t5). The fields correspond with each other so a technician enters his name and time (n1 and t1) Need to sum all of the time fields for each technician.

A name can appear in any one of the name fields so I need to sum an indavidual time field then once the sum is done I need to sum that result with the sum of the other time fields for a technician.

View Replies View Related

Combine Fields

What I try to do is to combine 2 fields in one directly in a form before the 'submit' button. I use Access and Dreamweaver MX ( ASP VBscript).

In the form, the fields to combine are 'Course' and 'Schedule' to one field 'Course+Schedule'.

I know that we can combine fields in Access. But I need to combine them before to submit the form.

View Replies View Related

Clear Certain Fields

im using the following code to loop thourgh field to prevent same value being added twice by the user in different fields, Code:

View Replies View Related

Empty Db Fields

How the heck do you work out what is actually in a db field that appears to be empty? I have fields that appear to be empty but do not seem to evaluate to empty or null, so test using IsEmpty or IsNull are useless, I 'm guessing it contains spaces or non-printing characters of some sort but how do I test for these?

View Replies View Related

Only The Modified Fields

I'm writing a page to update a database based on a form. I'd rather not update every single field, but only those that have been modified. Does anybody have any good ideas on doing this? It seems as though it might be slower if I go through each field, even the unchanged ones.

View Replies View Related

Require Fields

i have a list of records that a user fills out some text boxes and clicks some radio buttons and a checkbox to mark the record to update.how do i require those fields to be filled out before submission?

when i do it the way i know it doesn't submit because it is looking to require every textbox even if it's check to be updated.

View Replies View Related

Calculating Fields From DB In ASP

Let's say I have an Access DB with a table named proCount. In the table proCount, I have two fields named numOne and numTwo. In my ASP page I'd like to have a repeating region that lists all the records in the proCount table. Is there a way to have ASP calculate the sum of all the returned records for the field numOne and the field numTwo?

View Replies View Related

Hyperlink Fields

I have an asp calendar. Nothing complicated really. People enter the data through a form... it writes to a database... and when you click a day it retrieves from the database. The problem is one of the fields is a hyperlink to more information about the event on another website. The text of the link shows but it doesn't actually link.

I have the field in the database set up as hyperlink and not text and I'm pretty sure that the asp code I should be using starts out Response.Write.... I just don't know what to do next... I've tried everything imaginable... below is what I thought it should be but this didn't work.

Response.Write "<a href="Rs("Web_Link")">"

I'm sure I'm missing something painfully obvious.

View Replies View Related

Loop Through Fields

i have a form in which there many field, to make up a table.what i wnat to do is the first column has 7 fileds to allow user to input data into, the fields are named, A1,B1,C1,D1,E1 and so on.

what i want to do is loop through these and make sure that the user does not enter the same value or text name in more then one field. ie if mv90 is inputted into A1 it cannot again be inputted into any of the other fields.

View Replies View Related

Populating Fields

I have a check box, when selected it needs to trigger "something" to populate two drop down lists with default values. I haven't done this before, so I was hoping to see if somebody had a good example willing to share.

I was doing a research now and realized that I also need to mention it needs to populate values straight away not on the submission.

View Replies View Related

Arabic Fields Name

i want to know can i use arabic language to name the fields of table on access database and then use this names on ASP code and ....

View Replies View Related

Maximum Fields

WHat is the maximum no. of fields,we can create in Ms access 2002 table?

View Replies View Related

Results Every Ten Fields

I have a database in Access and I want to dislpay all the lastnames of the database through an asp file. I have managed to do that. But I want to display every 10 fields.I mean to appear 10 last names.and then to press next button and appear the other 10 and etc. Any clues?

View Replies View Related

Memo Fields

I have built a search feature for a site which searches 4 fields,2 in one table and 2 in another.It's an Access database.It works a treat when searching for anything except something like "I'd", or "it's" etc.Anything with a hyphen in returns one result,or less than there in fact are.

My SQL statement is as follows:

strSQL = "select id as strID, tableID as strTableID, tagline as strTagline, content AS strContact FROM news where tagline LIKE '%" & searchString & "%' OR content LIKE '% " & searchString & "%' UNION ALL select id as strID, tableID as strTableID, tagline AS strTagline, content AS strContent from databank where tagline LIKE '%" & searchString & "%' OR content LIKE '%" & searchString & "%' ORDER BY strID"

View Replies View Related







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