Join StudyUp.com Today

It's always free and anyone can join!

Watch StudyUp Demo Video Now

You Recently Visited

Sql Report Writing

Johnnie Said:

MS Access- I'm trying to write a report that queries a database..?

We Answered:

To execute the query, just click the Run button while in Design View. You don't really save the results, since any results may be obsolete once the database data changes. Instead, you save the query and rerun it as needed to reflect the current state of the database.

Once you've saved a query, you can make it the data source of a report. The report wizard basically paints how the report will look while tying various report fields to columns of the query resultset.

Marvin Said:

MS Access 2007 - how do I add a COUNT to my report?

We Answered:

You don't give us much in the way of details, but I'll take a stab at it.

Assuming you have some table containing an identifer such as userID and a Boolian field called status

1) Use the regular wizard to select columns userID and status and add the condition to status of 'Yes'
2) Save the query and then open it in SQL View...it should look something like

SELECT userID, status FROM someTable
WHERE status = 'Yes'

3) Change this query to look like

SELECT userID, COUNT(*) AS 'Yes count' FROM someTable
WHERE status = 'Yes'
GROUP BY userID

Jay Said:

how to create reports for sql tables in ms access?

We Answered:

There's a lot to it. However, the easiest way to get started writing a report in MS Access is to use the report wizard. Open up your database, click on the Reports button. Then click on New and select Report Wizard. Then follow the wizard.

As far as importing data from another database, first, setup an ODBC datasource for the Oracle or SQL Server database. Then, in MS Access, you can either import tables or link them. Importing will pull the data into Access and actually store the data in an Access table. A linked table will create a table in Access, but the actual data will come directly from the other database whenever you query the Access database. It depends on your needs.

To import one or more tables, click on the New button from the tables page. Then select Import Table. Set the "Files of Type" combo box to "ODBC Datasource" (it's at the end of the list). Then you can select the datasource that you want to import from.

To link a table, the only difference is to select Link Table instead of Import.

Hope this helps get you started,

Jeff
http://www.quizextreme.com

Adam Said:

Cleanest way to convert null values to zeros using Sql Server Reporting Services 2005?

We Answered:

use javascript in your forms page. using the onsubmit, enumerate every field and set the value if null. The code has some spaces in the document.x. ....yahoo doesn't like certain string groupings and truncates it....you will need to remove the spaces

if document.formname.fieldname = ""
{document. formname. fieldname=0}

You can do some more validation too......assuming you don't want negative numbers.....
if document. formname. fieldname < 0
{//Do something here, maybe a messagebox saying no negative number are allowed
//Change the color
document. formname.fieldname. style. backgroundcolor = "yellow";
//Set focus back on the field
document. formname. fieldname. focus();
//prevent the form from being submitted
return false; }

Danielle Said:

DBMS: SQL select queries?

We Answered:

The reason you have brackets 'here' and no brackets 'there' is because MS SQL Server is allowing you to put spaces in your table names and column names.

Generally speaking, you should not do this. Microsoft allows you to, but it wraps your name with brackets - I imagine to tell the system it is an alias name or substitute name for some other value with no spaces they automagically assigned to it.

A more suitable naming convention is all UPPER CASE and NO SPACES... Likewise, if you want to score browny points with your instructor - always use singular names - not plural. That is of course if you want to be proper about it. But - your problem is you are using spaces in the names of your columns and that is technically not allowed according to SQL specifications

Example:
UPCOMING_MATCH
-TEAM_ID
-FIELD_ID

If you absolutely think all uppercase looks horrible - then I would suggest using camel case (upcomingMatch) or mixed case (UpcomingMatch). But to get rid of the brackets, you gotta lose the spaces.

Virginia Said:

Write SQL embedded in JAVA programs to solve the following tasks:?

We Answered:

Do you have a specific question? Don't expect anyone here to do your homework for you...

Discuss It!