I have a Table (Table-name:Problem_List) and Column (Column-name:Title). There are many records in this table with the same (or similar) titles. What i'm trying to achieve, is a list of this column, but instead of 2000 rows, I need the similar names counted list like this...
Blocker : (100)
Serious : (34)
Warning : (430)
etc.
I have an ASP project that I want to return grouped records from a SQL database.
The data fields are, for example: Company = TEST, Portfolio = port1 Company = TEST2, Portfolio = port2 Company = TEST, Portfolio = port3 Company and Portfolio would be the fields in a table named "data".
What I need to do is display the results grouped by company. For Example: TEST -- port1 -- port3 TEST2 -- port2
I have not been able to get anywhere with this and hope someone can help. The only thing that got me remotely close was "GROUP BY" but it only works with one field. I need to return all of the data fields.
I am stumped as to how to do what appears to be a very simple thing. Want to display the results of a query containing fields ID and Item, grouped by the ID. I only want 1 instance of the ID to appear on the page as a header for each group. There are 10 IDs in the query results. Thought I could use <% Response.Write (rsName("Item")) WHERE ID=1 %>, but doesn't work. How else could I accomplish this?
SELECT sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor
Works great, returns the sponsor and the total * 2 of their referrals because that's how much they make per referral. My problem is I need to pull more information from that table yet still maintain my grouping by sponsor. Every time I try to add another field, or even * like
SELECT *, sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor
it wants me to group on all of the fields and I only want to group on the sponsor. I'm not smart enough to know how to nest these or group part of it, etc. Hope I'm making sense.
I have a list in a database that I have categorised using a category field. I now want to retrieve all records but grouped by categories.
how do i get my asp to loop through each category creating a recordset for each one rather than hard code a new recordset for each category i would rather it did it dynamically if thats possible ?
so eg
category travel 1 - B&B's records (recid 1) 2- rail info (recid 2)
category local info 1 - swimming baths (recid 3) 2 - museum info (recid 4)
I am writing a report using ASP and am having trouble displaying the data in the way i want. I'm collecting turnovers for various companies and each of the companies has a county code. e.g. Yorkshire is defined as number 2.
I need to group the companies together by county and need to display a totals line for those members only and then on the following lines I want the next county and its companies.
I can group the counties together but the totals line I'm displaying appears after each companies rather than after the group of companies for a given county.
I use a do while loop to check that there is data in the database for each company. I tried putting the totals line outside the loop and that only shows 1 totals line for ALL companies.
I know that the sql 'group by' function exists but it's not working the way I want it to.
Brief background:
I'm making a report that displays, among other things,
-Project Name -Project Number -Project Manager -Fiscal year total spending
My problem is, I cannot figure out how to group all my data together based on Project Number and Manager. Each project has several records for Fiscal Year total spending but the same information for project name, number, and manager.
For example, Project 1 called Test has Manager A and 19 enteries for Fiscal Year total spending (i.e. it's the past 19 year's worth of data).
The report includes a header section that lists the project name, project number, and manager. Below the header information is a list of the Fiscal year info. Code:
I've got a lot of referer variables in my dbase and I'd like to have a query that groups them just by the domain. Everything up to the 3rd "/" should do it. So far, I'm using:
SELECT COUNT(id) AS clicktotal, ref FROM clicklogs GROUP BY ref
This only lists everything by the actual referring url. Is there a way to only have it group by the domain within the referring url?
I have a FAQ section on this website I'm developing that is *supposed* to pull data from three different tables: tblFAQ, tblAssignedPanels, and tblPanels.
In tblFAQ, there are 4 columns: faqID, panelID, question, and answer. The panelID links the FAQ with the associated panel in tblPanels based on the same field (panelID). tblPanels also holds the name of the panel that is associated w/ the ID. Code:
I am displaying a list of data from a sql database. I have hyperlinked each field as i want the user to be able to click on this link, the page refreshes and all entries that are the same as the user clicked on are at the top of the list. I am using a query string as the link.
I'll get right to the point. I'm displaying an alphabetical listing of names from a recordset in the following manner: A abe alex ... B barb bob ... C craig etc...
Presently, I'm using a for..next statement to cycle through the alphabet, and displaying the matching names for each letter via a loop. Here is the code:
display just a listing of files in this manner.For example.If i select D: drive it should give me all files in root directory and sub folders and sub sub folders.
The operation is like a dos command dir /s/o/b
I am using this for sitmap for one of my client, who has more than 100 folders and 50 sub folder and 10 sub sub folders that he has more than 7000 html pages
I am tring to build a registration online form that participants will be able to choose from about 75 diferent courses divided into various sessions and choosing a course per session.The problem I have is that I cant figure out the best way to do this: 1. either to make them static pages and then submit the values the participant chooses into a database and use the values for billing etc. Like this i will be able to validate / control what the users chooses e.g they dont choose overlapping courses. 2 my second option is to list them in a database and then list them on my page , which is easier but how do I validate what the participant chooses and how do I move the values to the next page and making sure the right course goes to the right session.
Is it possible to list directories of different computers in a network?
For instance, I have the script on "server 1", "server 2" is another computer in its network places under the same domain. I want to have a asp or asp.net script list the contents of "server 2" from "server 1".
Is this possible? all the asp scripts Ive seen so far can only list files from the computer/server its on.
I've managed to get file listings, do textstreams, move around in the file system a bit, just wondering how I get folder listings as I would file listings... Here's what I've tried, but it's not quite working:
Set objFile=objFSO.GetFile(strPhysicalPath) Set objFolder=objFile.ParentFolder Set objFolderFolders=objFolder.Folders
For Each objFolderItem in objFolderFolders mess=mess & "<tr><td><a href=""" & objFileItem.Name & """>" & objFolderItem.Name & "</td><td></td><td></td><td></td><td></td></tr>" Next [/vbs]
I have been searching google and other search engines and have not come up with anything for this question of mine. Maybe I'm not typing in the right stuff. I am writing a couple of scripts that require me to display a list of information from a database from one catagory. I have never needed to do this before and am trying to find out how I should go about doing it
Assume I enter number 1 in "from" and 10 in "to" - I want the ASP to return: 1,2,3,4,5,6,7,8,9,10 and insert this into an Access database over 10 rows into the 'number' field.
At work I was asked to add a link to a directory listing page. This page is with the link is located behind a secure page requiring a username and password. When I added the link I also went to iis and checked to make this directory have directory browsing listing checked.
Everything is fine however now this directory is open if you just post the complete link to it in the URL bypassing the login page. Is this a nornal behavoir and is their anything that can be done to make it prevent it to be opened?
as i enter text in the textbox i want to narrow down there result in the box below that has all the listing of the products. i.e as i enter 'a' in textbox it will filter all products starting with 'a' then if i enter 'b' as second character it will show onlythose products that are starting with 'ab'... so how could i do that.
anyone know of a good ASP Application that will allow me to do featured listings/ or sponsored listings on a page? These need to be text based links - like google style probably.
What the above code is supposed to do, obviously, is write a person's e-mail address out, and at the same time include that address in a hyperlink so that someone could e-mail that person. The problem is that it doesn't show up. There is no error code or anything- the output just does not show up.
I would like to list all files and folders on a password protected directory (basick auth). I know how to list all files and folders in a normal directory but i don't know how to do so for a password protected one, due to the fact that i couldn't find any article/book that explains how to do so and also the fact that to the best of my knowledge there is no way to pass a username and a password to the File object in order to authenticate to the webserver as an other user, all i could think of was to pass the user/pass to this directory in the header (with response.AddHeader ) but that doesn't seem to work (even though i am not sure i used the correct syntax for the header).
I have an access db with 5 fields, ID, Category, BusinessName, Address and Phone. I want to list the records like so but can't think how my loop and check to see if the category has been changed should look. Can anyone help?
I have an Access Database with only one table (tblBooks) with 5 fields: id, TestNumber, Book, Author, ReadingLevel, PointValue. I would like to have alphabetical listing of the records displayed by hyperlinks on the top of the page like:
<Previous All | A | B | C | ....| Y | Z | Others Next>
Also would like to have only 25 records per page and bottom page numbering. I know this is a newbie question but I haven't being able to figure it out.