I have an access db with 5 years worth of articles. I need to be able to list them according to year from a query string. I am having no luck with this. Can anyone help. SQL is not one of my strong points.
vyear = Request.QueryString("year")
strSQL = "SELECT * FROM tablename WHERE "& DatePart("yyyy", article_date) &"="& vyear &" ORDER BY article_date desc"
I have tried this a few different ways with no luck at all. I keep getting errors.
I have a date field in an MS Access database. I need to sort this field and print the results to an ASP page. I have done this plenty of times before except this time the date field data includes BCE data. A sample of the data in the date field is as follows:
1300 BCE 930 BCE November 29, 1947 May 14, 1948 1465 CE October 29, 1956 1020 BCE
I know that I can not have the data type of the MS Access field set to date/time. I searched online and didn't find too much.
I have a date field in an MS Access database. I need to sort this field and print the results to an ASP page. I have done this plenty of times before except this time the date field data includes BCE data. A sample of the data in the date field is as follows:
1300 BCE 930 BCE November 29, 1947 May 14, 1948 1465 CE October 29, 1956 1020 BCE
I know that I can not have the data type of the MS Access field set to date/time. I searched online and didn't find too much.
I have Table Named "League_Table" in MS Access and data Stored in Table as follow Tm P W D L Pt ABL 2 0 0 2 0 HBL 2 1 1 0 4 KRL 2 2 0 0 6 PIA 1 1 0 0 3 ..................... ..................... ..................... ..................... ..................... .....................
There are 16 Teams in League. Now I want to sort Records on the basis of Points, assign Rank to Teams and display on Web page using ASP.
I am using asp and access database on my page Up untill now I have just been listing all catagories from the database on one page, now the list has become huge.
I would like to have a page with an alphabetical list of links A, B, C etc and then just display the catagory records beginning with A etc depending on user input.
I have a Table with several records with several columns in each record. I need to sort these records based on the column 1 AND then based on the column 2.
I used the following SELECT code, but I got error. It doesn't take two ORDER By statement: objRS.Open "SELECT * FROM myTable ORDER BY Col1 AND ORDER BY Col2", objConn, , , adCmdText
i want to sort my list alphabetically dynamically(using ASP code)somethin like this,
http://www.raaga.com/channels/hindi/movies.asp
the records are coming from a db,so my question is how do i achive this?? should i write a query for each charactor something like: "select * from tablename where name like a%" then "select * from tablename where name like b%" ... till .. .. "select * from tablename where name like z%"
I like to pull the top 5 record that are closest to the current date but the date field can not be empty, see some records do not get assigned an expire date and others do. I want to show the closest expiring records.
objconn.commandtext = "SELECT TOP 5 * FROM merchants ORDER BY Expires"
What do I need to add to exclude the emtpy expires field records.
I have an sqlstatement which is executing on my form it works fine in sql server enterprise manager but obviously the function that is used in sql server enterprise manager will not work on a form i am coding with asp...my sql statement is as follows
Sholiday.source = "Select * from Year WHERE Year= IsDate(Year) order by bhdate"
this doesnt work fine, because i would like that the Year that my sqlstatement picks up to be equal to the current year we are in..can anyone tell me what the function for that is in vbscript... i am using vbscript and asp..
Basically what im trying to do is create a dynamic drop down box that changes its output each year.
It is a drop down box that displays years, but i need it to be always a minimum of 18 years minimum from the current year e.g as its 2004, it needs to display 1986 as its minimum year and upwards to 40 years from 2004, because the type of people im looking for need to be over 18, and no more than 40... And this is within a form, so the users choice of years is collected on submit.
I have a set of values like name,age,desg,salary,year etc . currently i am getting the values using max(year) and displaying the values year is integer in my sqlserver db If you go thru my code (see attachment) you would be able to understand.
Now the problem is if a person gets promoted or hike in his salary i have to display two differnt salary on the same year how do i do that. currently i am displaying the values based on the max(year) max(year)-1 etc. i cannot modify the database. i have to do some changes on my coding only. Please view my coding as attachment (3000.txt).
For example Name Age Desig Salary Year abc 35 CEO 39000 2004 abc 35 CFO 38000 2003 abc 35 CTO 37000 2002 abc 35 CTO 35000 2001 abc 35 Direcotr30000 2001
I have a set of values like name,age,desg,salary,year etc
currently i am getting the values using max(year) and displaying the values year is integer in my sqlserver db If you go thru my code (see attachment) you would be able to understand.
Now the problem is if a person gets promoted or hike in his salary i have to display two differnt salary on the same year how do i do that. currently i am displaying the values based on the max(year) max(year)-1 etc. i cannot modify the database. i have to do some changes on my coding only. Code:
i wan to do a page at the backend,when the date is end of this year(12/31/2007) then will execute the code (such as add the new total leave with the current balance leave automatically without regresh the page or login into the system.)
i heard that the MS SQL SERVER got this triggered function, but unfortunately..the MS SQL SERVER hosting that i used(third party) didnt provide this function. i jz can store data in the table and create database..no more others component that i can use.
I need to make a countdown to the year 2004. I want it to have days, seconds, minutes, hours, etc.
The only problem is that my server is 3 hours faster than my time, and I need to adjust it in the script somehow, and also please give me the script for the actual countdown.
I have an Access table with (among others) a number type field.
I'm building a web form which will add a new record to the same table. My problem is as follows:
I need to retrieve the (number) value from the previous record and increase it by 1 when submitting the new record. Also, this number should reset to 1 whenever a new year occurs.
I have a form which allows a user to select a 'commencement date' using separate day, month and year drop downs. The date is then submitted to db in DDMMYYYY format(as required).
I now need to allow user to edit this date if they need to. So, I retrieve the date from db as ie. 30101968. I now need to place the first 2 digits (30) into strDay, second 2 digits into strMonth and last 4 into strYears so that I can reflect these values in the their relevant drop downs.
Does anyone know how to 'grab' those specific values?
I have a script that I want to display the returned list numerically in. The database is deciding how to order the list, and is being displayed pretty loosely. Is there anyway I can sort the returned list numerically here? Code:
I have a database table, that I need to sort by PART of the contents of a field (named rFieldName in the table):sample contents of this field are:Code:
qid_5_question_1 qid_12_question_5_0_1 qid_12_question_5_0_2 qid_12_question_5_1_1 qid_12_question_5_1_2 qid_12_question_5_2_1 qid_12_question_5_2_2 qid_12_question_5_3_1 qid_12_question_5_3_2 qid_6_question_2I need to sort his field by the value that appears AFTER the 3rd underscore, and if applicable BEFORE the 4th underscore Is this possible - can you help please - I have no idea where to start on this as I've never had to try to do something like this before.
I have a JS/ASP application that sorts a SQL populated table. This works great, and sorts the data fine, apart from my currency columns. It wants to read the data as text as far as i can gather. Ths data in ASP looks like this - <% =formatcurrency(RS("income"),2)%> I have tried changing this to a number (formatnumber) and hard coding a £ sign, yet it still wants to read the data as text, rather than numerical? How can i get my JS function to read currency or if not, eliminate the forehand figures. I need the data to appear as a currency, yet be sorted as a number (rather than taking the 2st digit)if this is a common problem (sorting currency) and there was a universal solution around this
I've lurked on here for awhile but I've come upon something I'm having trouble with. I have a database table of movie titles and I want to sort by the column, but ignore the articles in the title, "a", "an" or "the"... "The Lion King" would be under L... "A Bronx Tale" would be listed under "B", etc. Does anyone have a function that does this or know of another method? Or am I forced to enter them as "Lion King, The", for example?
And one clicks on the form, and a SQL statement is executed. However, when I create the SQL statement,
INSERT INTO table1 (FormId,AdvantageId,SortOrder) VALUES (<call from form ID>,<advantages>,<advantsort>)
Then it loops to allow the next phrase to be entered. The statement also takes the value from every other sort order value including that ones that are in different lines. Which in result, gives me an error, saying the insert columns exceed that of the available columns in the table.