i have a a SQL stored SP bringing out one recordset, I have a loop reading out all the records, what I would like to do it compare each record to the previous one and if it is the same then do something. I'm having trouble figuring out how to do the comparison as I loop through the records
I have an excel file with some data inside. I have to check the data in the excel file against that in access and print out all similar records. For example in the excel file in just one column: Code:
i have numeric value in my database with two decimal. now i have search page where user can type numeric value. so i want to compare user entered value with my db value. the result will give less than or equal value to user entered value. i had tried following
est = request.form("est")
sql = "select * from mytable where est_cost <= '%"&est&"%'"
but is not working. i think there is some syntax error in comparing numeric value.
Here's my goal: 1) to set up a 7 column table containing a list of 147 numbers from a recordset (StNumberRS) and 2) to compare those numbers to a separate recordset containing a partial list of those numbers (completedStores).
If one of the numbers in the completedStores list matches a number on the StNumberRS list show the 'icon_yes.gif' image, otherwise show the 'icon_no.gif'.
I can loop through the StNumberRS and set up the 7 column table, but I'm stuck trying to loop through the completedStores list while inside the StNumberRS loop. Could someone look through my code and see where I've gone wrong? Code:
I'm again having trouble putting ASP records INSIDE html link. Here's the string I put inside Access field:
No room number specified (<a href='contact.asp?subject=corrections/addition for AASG.info group ID <%=(Recordset1.Fields.Item('group_id').Value)%>'>update</a>)
but it is not working. The link created in my html output puts out asp part LITERALLY and does not put the VALUE of the recordset.
This didn't work either:
No room number specified (<a href="contact.asp?subject=corrections/addition for AASG.info group ID <%=(Recordset1.Fields.Item('group_id').Value)%>">update</a>
I have a recordset which displays a feild with the initial value of 1, I want to be able to increase the value with whatever numer I choose.if I set antall = antall + 1, It increases with 1 nomather what number you put in, how can I make it work the way I want.
I have two records pulled from the same field in a table, so it would look like this
NAMES (Field name) John (forename) Smith (surname) There will always be 2 records
I need to take both these records and split them into two variables - one for the forename and one for the surname - (I need to insert these values into SQL statement)
Have tried the following code 'firstname' contains both the first and second name.
I am trying to soleve the following problem using an asp recordset (connects to sql) A column in the recordset contains integers between 1 and 5. I am trying to find a way of concluding which integer is the most common, then the second most common, then the third. (In the event of a tie, the higher integer 'wins').
Hence if in the record set there were 5 1s, 4 2s, 7 3s, 1 4 and 5 5s the output would be Most popular = 7, send most popular = 1 and third most popular = 5. I am familiar with rhe recordset objects ie looping through the records etc .
I am trying to filter a table of users to select only those records whose roleID matches a value in an array. There could be any number of IDs held in the array from one to a few hundred. The array is generated by splitting a comma delimited memo field from a second table in an Access DB. I can split the memo field OK, I can response.write its values, but what I now want to do is add a value from another table to my reponse write loop. Code:
I have an interesting situation that needs to be addressed ASAP.
I am running a standard SQL Query in ASP to retrieve some rows/columns from a table that's on a SQL Server 2000 database. I put the results of that query into a RecordSet, and then use the GetRows function to push the results that are in the recordset into an array variable. In the query that I am running, 39 columns and 2 rows are returned.
The GetRows function appears to be working - the array variable is being created with the proper dimensions. However, the values of the different "cells" of the array are not showing up correctly. The first and the last column values for each row are correct, yet everything else in between is blank, empty, NULL, or whatever.
In other words: ArrayVariable(0,0) shows up correctly, ArrayVariable(38,0) shows up correctly, but everything in between is null.
I did a test on the RecordSet and discovered that it was the culprit - it wasn't being filled in properly. This is strange, though, because the select query that I run in the ASP code to create the recordset returns perfect results when I run it on the SQL Server 2K database.
I have an array, let's say: a(test1, test2, test3). test1 = 1, test2 = 3, test3 = 4. I have a for loop: for z= 0 to 2 if a(z) > 0 then (what I am trying to do is if test1 > 0 then do ...) somecode end if; next Could anyone let me what is wrong with my if statement? The code inside the if statement does not executed.
i am having a problem with comparing two strings. I am taking in the parameter rs("Company") and if this is empty i want to put some text in there. I am testing it with an empty Company field and comparing it like so:
temp1=rs("Company") temp2=StrComp(temp1,NULL)
I have also tried it with temp2=StrComp(temp1,"")
but each time i get nothing returned. Is there some rule about comparing a string with an empty string?
I have an expiry date stored as a text field in the following way "2003-08-23" (this gets round the US/UK date prob)
The problem is I want to be able to show a Renew option on the page FROM 30 days prior to that date. And then of course if they don't renew, it unsubscribes them.
Question, how can I compare this date to see if todays date is 30 days or closer to the expiry date?
I have this page with a drop down box which loads the itemnumbers dynamically. However, I want it to NOT load the numbers that already exist in the weborderlist. What can I do to my SQL statement to make this work?
Code:
SELECT (SELECT img_inv.item_num from img_inv, weborderlist WHERE img_inv.item_num <> weborderlist.item_num and weborderlist.orderid= '1') as test
Need to do a search engine to search through a bunch of static pages (html)). so uing asp. but the page is in chinese, so how do i scan each and every html file and search for the chinese word?
<% rs=Server.CreateObject("ADODB.recordset"); rs1=Server.CreateObject("ADODB.recordset"); sql="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi where coi_index_number='"+p2+"'"; sql1="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi1 where coi_index_number='"+p2+"'"; %>
Now i need to compare these two above mentioned recordsets....and want to pop up an alert box on the client side.....sayin whether they are same or no.
I have a simple html/asp form that submits data to an access DB. The idea is when calling a record back from the db, the page will have an option to change certain fields (drop down) then a new submit option. My question at this point would be what logic or commands would I use to compare the original data in the fields to what's being submitted.
I ultimately want to preserve the original records and somehow append data that changes only. I'll need to eventually call a record and see all the changes/updates made. Someone mentioned I would prob need a couple of tables with a link (relationship) but is it possible to dynamically create fields as changes are made?
basically the first array holds all the text_ids for the table text and the second array holds all the text_ids on a table join. What i mean is i have joined two tables text and text_section and it lists all the textids in the section.
i need to return a list of the textids that are not listed in the section so i need a way of comparing the two arrays and pulling out the ids that appear in array1 and not array 2 .
I have ASP code to compare an input date and the current date. If the input date is less than today, it should give an error message. It does do this, except it doesn't consider the year, only the month and day. If I input 7/12/2004, it will not catch the discrepancy, but if I input 2/3/2005, it will. Here is the code...
Comparing dates ?!? I having fun with dates, NOT….. I have a place where I need to compare 2 dates. Even though they are the same they will not be compared as the same in an IF statement.
Donw is a # of the day of the month, IE: 26 that is pulled from a data base. The goal is to compare dats like this :
IF ( donw ) = day(now) then ----Red stament Do this Bla Bla---- Elseif (donw ) = day(now) – 1 then ----Yellow stament Do this Bla Bla---- Elseif (donw) < day(now) then ----Green stament Do this Bla Bla---- end if
I need to compare the actual time on my server to the value I'm receiving on a database. For example, let's say the actual time is 1:45 PM and the value in the database is 11:52 AM. I need to compare that if the actual time is after the one on the database, it returns a true value, if not returns a false value.
I tried this ASP code, bit it didn't worked, any ideas? Code:
varDate = Date() SQL="SELECT id,name,eventtype,location,fromdate,todate FROM events WHERE publish='1' and fromDate > "& varDate &" ORDER BY fromdate asc"
fromDate is a Date/Time field in access. What i want to do is pick out any data which has a fromDate which is greater than today but the sql command isnt picking out any data. does anyone know how i could change my script to work.
I have a two tables in my database with a username column in both of them, i am trying to build an SQL query to return only the usernames that are not listed in both of the tables. Any ideas?
how can i compare 2 record sets. In one RS i have excel file and other RS i have SQL server and when i get the results from both i want to compare them as one of you guys suggested me to write a loop that cycles through the record sets Comparing any fields.
I am facing a situation I dont know how to solve... at least with a good server response for 400.000 users.
Maybe someone may help:
We have a B2B with a list of thousands of products listed. Users can select the products they like in order to contact the seller later on from a "cart of products/contacts". Selected products are stored in a session variable.
What I want is: How to remove the check button of each product that has already been selected, and instead of that, show something like "selected" or similar.
The problem I am facing is to compare each product ID against the session with all selected products. This comparison for every line/product could harm the response of the server with the high number of users we have. how would you do this comparison?