2524Using SUM Function in An SQL Statementhttp://www.dotnetindex.com/read.asp?articleID=71Sum function can be used for to get the sum of a numeric expression evaluated over a set. This function must be placed in an SQL statement. Following example will return the sum of ratings in articles.
In this example we have used our old database. There was a rating column holding the votes of our articles. We were using this simple script to check sum of ratings.ASP > Tips and Tutorials > Database-relatedOct 10, 2006
Databases are a way of organizing and keeping your data. The data stored in databases can be anything from user email addresses to binary files. Databases have become so popular in the past decade that it is almost unimaginable to not to use them on the web.
This page demonstrates the capabilities how to display a table from a SQL statement. It illustrates not only how to display the table, but also how to detect that no records were returned from a query, and how to detect null and blank values in the data.
The power of Active Server Pages comes through when we tie databases to our web sites. To connect to a database, ASP uses what is called ActiveX Data Objects, or ADO for short. ADO comes with ASP, and can be used easily from your ASP pages.
In this tutorial we will show you how to connect to our Access database called 'examples.mdb' and retrieve all the records from the table 'cars'.
At first we must create an instance of the connection object and feed it the location of the database we wish to connect to and the driver that we intend to use. For these purposes we will use a connection string. You can choose an ODBC or an OLEDB connection string. We will use OLEDB for our example as it's faster and more stable. Next, we should open the connection to the database:
The SQL Distributed Management objects (SQL-DMO) extend the functionality of SQL Server by providing developers a way to execute common tasks using programming and scripting languages. The first article in this series entitled "Using the SQL Distributed Management Objects", provided an overview of SQL-DMO. This article expands upon those concepts by showing you how to use SQL-DMO to create an Active Server Page application to backup and verify a SQL Server database.
Database programming is like a confused little monkey. Puddlin? on the floor and screaming at the walls, it?s a tedious little thing that?s prone to memory leaks and lots of errors and mistakes. To the dismay of anyone hoping to avoid a headache, database programming is ridiculously redundant and incredibly boring. Because web development loves its little monkey sooooo much, it?s unfortunately here to stay.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.