select distinct c.execno, c.month, c.year, ISNULL((s.shift* 7.17 * l.mainuph),0) AS Capacity, s.shiftdate from mainline m left outer join custorder c on m.execno = c.execno left outer join execmaster e on e.execno = c.execno left outer join model l on e.model = l.model left outer join mainshift s on s.line = e.line where l.model = 'gbm 10' and Month(s.shiftdate) = c.month order by s.shiftdate, c.year, c.month
after i have a join table. the higlighted part, when i put it in my asp page.can i just call out to do some other calculation. maybe that capacity i take it out to do some other calculation? is that possible?
Depending on the percentage given, each section gets a pass or fail and there is then a final pass or fail calculated within the page I want to display the information. What I would like to do now is show a sort of traffic light image, green, amber or red depending on which sections are passed:
Green if all sections passed, Amber if any section failed but still achieved a pass mark and Red if the student failed to achieve the overall pass mark. Code:
The manual way of calculating utilization on 4/3/2005 will be [(Time between 0900 to 1100) + (Time between 1200 to 1400) + (Time between 1500 to 1630)] / (Time between 0800 to 1700) X 100%
The problem is that depending on what time the next person arrives, there might be an overlap in time. For example, A comes at 9am and leaves at 11am. B comes at 9.30am and leaves at 12pm. The total duration will be from 9.00am to 12 pm that is 3 hours instead of (rs("time_out")-rs("time_in")) = (11-9) + (12-9.5) = 4.5 hours
Is there a formula or way to automate this process?
Can i calculate the next month starting day and next month ending date.For example if this is january then i need the next month that is february starting day and february ending day. I need to calculate the date in that way given below, I mean without query. Below method is i use it to calculate the todays date and the end of the day.
I am using the DateDiff function to compare two dates in a query on a page. I then need to use the "Expression" created from that DateDiff function in a WHERE clause calculation, but it is not working correctly.
The page loads successfully with thre recordset populated, but the WHERE clause has no effect on the data. I'm guessing that I am doing something very wrong, but I have been staring at this for hours with no avail!
I've created a form where the form field integer values are added to create and display a total once submitted, but my form is displaying a Mismatch error. Do anyone have any suggestions?
I have to calculate the percentage of an X amount depending on the Quarter of the year. It's driving me crazy, I can't figure out how to do it. Am I missing something. If someone registers the 1st quarter then the price is the full 1200. f the registration occurs the 2nd Quarter, then it is 25% less that rthe full amount. The 3rd is 50% less and the 4th is 75% less.
the amount is 1200 the Quarters of the year = 4 The regristrant is 1
Then I submit this page with all the values in TeamScore for every employee and I want to perform a calculation based on the values in the drop-down and a weighted score from another database table. An example of a weighted score is 0.11 and I need to multiply the value(from 1 to 10) times the weighted score of 0.11 for each employee.
I have several records to update all at once from the previous screen of drop-down boxes containing numbers 1 - 10 and I want to take each individual drop-down value and multiply it by a weighted score (i.e. 0.11 etc.) Code:
I would like to calculate freight online for UPS and Fedex. However I have already calculate freight for ABF, Roadway and MyYellow, because they have provided sufficient documentation of Input/Output parameters. I try to find out Documentation on Fedex and UPS, but did not find any documentation or any sample code for this.
I hope some of the guys already did this excercise, can anyone tell regarding this?
FYI, I have created UPS account and FedEx and same Information I hv asked from them but did not get any reply for them also. Code:
If ad_expiration_date (date() + 90) then ad_expiration_date = (date() + 90) else end if
What I want to happen is if the ad_expiration_date entered by the user is beyond 90 days from today's date, the Expiration Date should be today's date plus 90 days. If the entered date is less than 90 days from today's date, leave it as entered. The code isn't working correctly, all dates entered are getting converted to today's date plus 90 days.
I have this form where in i calculate the number of months between 2 dates.It calculates only if both the textboxes have values. And then i display this in another text box. The user has to enter the date in DD/MM/YYYY format. user can select date from calender popup. Apart from selecting the user can also type in the date. I am using a function which splits the date entered by the user into DD MM YYYY and then compares each of these values to see if its in the valid range like day is between 1-31, month between 1-12 etc. But i m having a problem. If the user enters characters instead of digits, my system accepts it in the first box without giving error and then when the user selects a proper date in 2 textbox its gives an error: 1 is null or not an object. this error comes at the place where mt function splits the entire date string into DD MM YYYY. Could someone please give ne a solution, a way to format the date so that i let the user enter first 2 digits and then a "/" and then 2 digits and then a "/" and then 4 digits only.
I would like to display the difference between the logging time [Session("start"] and the current time [now]. In hours minutes and seconds, I have tried a couple of things but all I see is gobbledy gook.
I am developing a simple ASP-Access system for invoicing purpose, and the system is in 98% progress. What I want to do now is to add some sort of "control stock levels".
Let say I have set the quantity of an item/product (eg, pencil=100) in my database (in my database it refer to the table tblProducts with the field called PStockLevel) When one customer want to buy 10 pencil, the system will automatically set the PStockLevel to 90. All the calculation will be done in the page called tasks.asp.
I am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate Home Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer) GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData
This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?
i want to calculate the total time between to dates and time.
Example: Total time elapsed from date 1 time 1 to date 2 time 2.
27/09/2004 11:00 - 28/09/2004 10:30
The user enters a record and then later comes back and closes it. I need to know the time it took from when they entered the record until the time it was closed.
I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.
I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.
I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).
I am trying to pass a hidden field value on a form into another field on the form so that it can then be inserted in the database, to enable me then to reference that number at a later date.
(The hidden value (1 for example) would then automatically get passed to the other input field.)
The code for the text field that allows users to type an number into it for submission to the db is below, but what code do i need within the hidden field to populate this text field below so that users do not have to type the number in? Code:
I have being working with making an edit field over the past few days. The edit function is now working fine. The edit fields that i have are for id, subject, notes, timedate.
All of the edit screens are one line text screens. What I want to do now is increase the size of the notes box to a larger textarea type box to make it easier to edit notes. The notes field in the db is a textarea field. Code:
When you select the "Country" field in a Hotmail "get new account" link, the field "State" changes automatically, giving you the correct States that belongs to the chosen Country.
I would like to capture an entered value and use it in a query (Access)
Part No. __________
Do I need to store it in a variable and then can I have the query come up on the same page - they would enter a value and click a submit button. I'm not sure that I am on the right path. I'm not sure what syntax to use. Code:
Using asp and mysql, can a text field in the db have a record with asp code in it and then display correctly on an asp page?
My experience is that it does not show anything in the <% %> tags but it shows the asp code when you view source. My coworker wants to make our website database driven and this text field was going to be the page content with html and <% if then else %> statements.
This does not work with php either so is there another field type that will parse server side scripting?
Im wondering if there is any way to add a field into an MS access Table using SQL/ASP..
The reason im asking is my database online is Access 2000 (which i have at home), and im in work and they use Access 97.. so i cant download the database, add an extra field into the table, and then re-upload..
Ive tried using a Make Table, Update, Append.. but it doesnt like any of them statements..
I have a condition that will run depending if a field in the database is NULL. It will not run at all, and I tried various way to write it but none works so far
'not working If assignee = DBNull Then
'not working If assignee = null Then
'not working If assignee = "" Then
If I write assignee to the page then the value of assignee will write if it has a value and nothing if it is null.