473,597 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to retrive the data using asp

15 New Member
Dear all
iam new for ASP

I have data in database as like as follows

Name company shares date
A x 100 1/1/07
A x 200 5/1/07
A y 100 2/1/07
A y 500 5/1/07


I need to display as follows

Name company shares date
A x 200 5/1/07
A y 500 5/1/07

U can notice the latest updating for each name for all companies
This is the output I should show in my web page
Jan 23 '07 #1
1 1449
jhardman
3,406 Recognized Expert Specialist

I need to display as follows

Name company shares date
A x 200 5/1/07
A y 500 5/1/07

U can notice the latest updating for each name for all companies
This is the output I should show in my web page
so... your database potentially has multiple entries for each company, and you only want to display the most recent?

I would sort the data by company, then date in reverse, then only display the first (most recent) entry for each company.

query :
"SELECT Name, company, shares, date FROM companyTable ORDER BY company, date DESC"

Hmm. Syntax doesn't look quite right. I'll look it up if you want.

Anyway, after you pull up one entry, skip ahead until you get to the next company, pull up one entry, skip ahead, etc.
Jan 31 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
4366
by: Bruno Alexandre | last post by:
Hi guys, withou using SP, I want to be able to add a Parameter to the SQL Query and retrive the Recordset so I can use the Paging property under the recorset object.... how can I do this? I'm stuck here.
2
3904
by: eric | last post by:
Hi Does any one know how to retrive data from foxpro 2.6 memo field in c#. I just manage to retrive the first row. /Eric
2
2134
by: Goran | last post by:
I'm a student and I've just started to learn Visual Studio.NET. I have a project to make a web application. I have a problem to connect to the database and retriving the PassType of the tblEmployee. First I create Bussines Object user.vb and I declare in it: Public Class EmployeeDetails Public EmpIdNo As Integer Public Name As String
2
1606
by: Terry | last post by:
Any .dll or COM+ for .Net can help me retrive data from a Access file? The table contain several columns and the last one is a container which I store Article; because each article is a little bit huge, so when I store it, it ask me if I want to pack it (the article) into a object then I click 'Yes'. But now I need to retrive data from the file and show it by datagrid, and now I don't know what kind of data type it is (when I click it, it...
4
1792
by: Toto | last post by:
Can I retrive a session object by a session ID which is stored in a cookie in my server side code?
0
1270
by: avishekb | last post by:
can anyone suggest me how to retrive data from a xml file using c/c++. for example: <schema> <applt to>portno</applyto> <type>int</type> <value>8080</value> </schema> i want to retrive the value 8080 from the file and assign it to portno,so that when i am using portno in my program it will be replaced by 8080.
3
1960
by: =?Utf-8?B?UGV0ZXIgSiwgU2Nhbmlh?= | last post by:
Hello I'm looking for an solution about how to retrive data from an client side located Excel document by using an ASP.Net application. I don't want to upload the file to the server. I just want to get the data and persist it in an database after that some business validation have been done. Does anyone have any idea?
23
3400
nehashri
by: nehashri | last post by:
hi i am designing a database using Ms Access and ASP. i have 3 tables in access namely 'PERSONAL', other as 'POLICY' and 3rd one is named as 'STAFF'. in the contact table i have ID, Name, Children as fields. Also in policy table the firlds are:- ID, date_of_policy, no_policy, amount_paid, amount_balance and similarly the 3rd ie., staff has few fields. all three are linked my a common field which is ID all i want is when the user searches...
0
1530
by: varaprasad204 | last post by:
hai all..., i used to store my mp3 file into database by <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <%@ import Namespace="System.IO" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.Drawing.Imaging" %> <%@ import Namespace="System.Drawing" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Web.UI.WebControls" %> <script...
1
2980
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for image upload in database: -----------Upload.jsp---------------- <html> <head> <title>Account Details </title>
0
7965
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7885
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.