Grouping Multiple Fields

Jul 21, 2005

I am trying to display five columns from three seperate tables. The query is fine but I have redundant fields showing. I thought the GROUP BY operator would fix this, but I have more than one column to select.


SELECT ID, FirstName,LastName, Salary,City
FROM worksat INNER JOIN store ON worksat.store = store.storenumber, employee
WHERE worksat.store=store.storenumber
GROUP BY city, id, firstname, lastname, salary
ORDER BY city;

Thank you.

View Replies


ADVERTISEMENT

Reports :: Grouping Multiple Fields (Firstname / Surname)

Jan 21, 2015

I have a report with the fields

Firstname_
Surname_
[field1]
[field2]
etc etc (they're not called field1/2 but they're irreverent at present.

On the database people can be entered multiple times so I may have

Bob Smith
Jimmy Carter
Bob Smith
Jackson Smith
Tim Jones
Jackson Smith
Bob Holmes

Now I now with the group function I could group by the firstname_ field but the results would group like the following

Bob Smith
Bob Smith
Bob Holmes

Jackson Smith
Jackson Smith

Jimmy Carter

Tim Jones

And if I do it by surname, well I am sure you get the drift.

So how can I sort so I would get the following

Bob Smith
Bob Smith

Bob Holmes

etc etc.....

View 2 Replies View Related

Grouping Yes/No Fields

Aug 22, 2006

I'm in the process of setting up a form, and I have 4 yes/no fields that need to be in it. I want to group the fields so that only one of the yes/no fields will be able to be selected. The fields are: Pass, Fail, N/A, and obsolete.

I tried setting up an option group, but I can't seem to get the information to filter back to the table that is capturing the data.

Any help? :confused:

View 1 Replies View Related

Grouping Multiple Columns

Jul 21, 2005

I am trying to display five columns from three seperate tables. I thought the GROUP BY operator would fix this, but I have more than one column to select. The query is fine but I have redundant fields showing. Oh, I'm not worried about the calculation "[employee.salary]*0.1 AS Salary_After_Raise." I just want to concentrate on narrowing the fields down first.

SELECT ID, FirstName, LastName, Salary, [employee.salary]*0.1 AS Salary_After_Raise, City
FROM worksat INNER JOIN store ON worksat.store = store.storenumber, employee
WHERE worksat.store = store.storenumber
GROUP BY city, id, firstname, lastname, salary
ORDER BY city;

View 1 Replies View Related

Multiple Grouping Criteria

May 30, 2006

I am trying to produce a report or query that lists 11 attributes for several projects measured each month over the duration of each project. i.e. It is required to have the attributes for project A listed (horizontally) for months 1,2,3,...etc (vertically) followed by those for projects B for months 1,2,3,4,5,6... etc. Can anyone advice on how to do this please?

View 2 Replies View Related

Summing Different Multiple Amounts With Grouping

Jul 13, 2006

hey all, thanks to anyone that can help

i have 5 fields facid custid empid amount invdate.

i need to be able to get totals on the amount based on fac, cust & emp based on a date range given by user, but here's the kicker.. i need to get the current month totals, month totals - 1year (so same month but for last year)
the date range totals, last yeardate range
current ytd, last ytd

i did it using code, but the performance isn't that great. there are 2800 customers it has to cycle through and figured one of the resident experts can help with a query.
i've used dsum() but not quite getting the results i should.
i think one of the problems is the user has the option of filtering the data based on the 3 fields.

anyways if you can help i'd greatly appreciate it..

View 2 Replies View Related

Reports :: Grouping A Report With 2 Fields From 2 Tables

Nov 8, 2014

I'm trying to create a report with data from 7 different tables. It's supposed to be an assignment overview for a transfer company (driving people from A to B, dunno how to call it in English). I put assignment and customer details into the page header, which is working out fine so far. But now I want to show transfer details and it's proving to be a bit troublesome.

When creating the assignment, the user can choose whether the transfer goes from/to an address or from/to an airport. Depending on which one he chose the data is stored in different tables. To determine whether it is an outward journey/collection, outward journey/target, return journey/collection or return journey/target, I put a field in each of those tables ("Schritt", its value being either 1, 2, 3 or 4).

To visualize I made screenshot of the tables in relationship view, but since I'm a new member i can't seem to post images, so I'm giving you a pseudo URL...

[abload (dot) de (slash) img (slash) transeren40p1r.png]

The final report should look like this:

outward journey
---collection (1)
---target (2)
return journey
---collection (3)
---target (4)

Having the "Schritt" value for each step in either one or another table (address(es) or flight data) is making it a bit hard for me to wrap my head around the problem. Is that doable with expressions or is there a way in VBA to solve this problem?

View 7 Replies View Related

Reports :: Grouping With Information From Multivalue Fields

Feb 6, 2015

I have a table which now contains a couple of hundred records with more than thirty fields each, and will ultimately contain over 1000 records. Some of these fields use the multiple value feature, and the fields and the forms which fill them work beautifully. Now comes the challenge.

Without going into detail that I'm not at liberty to share, I can say that there are different offices which have different people who are responsible in different ways for the work covered in these records. It is possible for each record to have multiple people assigned to it from the same office. This requires setting the control that shows the people from each office to allow multiple values. I need to be able to create a report which will allow me to hand a list of all the records each person is responsible for in the office to the person responsible, in spite of the fact that this will mean records will show up on more than one person's report.

Before I knew that there might be multiple people in the office for each record, I created great reports grouping and ordering by this office's control and field. Now, since they allow and store multiple values, I can't use them any more. I need to be able, as I said above, to get the same effect. I think the answer lies in some sort of calculated field or formula that applies text filters. What I need to be able to do is look in the field for this office and see if a person's name is contained in the field for that particular record, regardless of who else might be in the field, too. I need to be able to use the results from this filter or calculation or formula to generate something I can use in the group and order by processes.

View 7 Replies View Related

Queries :: SQL Crosstab Query With Multiple Grouping Levels - Transform Statement?

Mar 24, 2015

I'm trying to construct an SQL crosstab query that will output data like the picture I've attached in the .zip file.

The four variables from the data table would be [Client Accounting].[Marketer] (the left vertical column), [Client Accounting].[Closing Date] (the higher level horizontal column grouped by month), [Client Accounting].[Write Off] and [Client Accounting].[Refund] (the lower level horizontal columns as sums)

The totals column at the bottom and the two vertical columns at the right would be made in the report and wouldn't need to be in the query.

This is what I have so far but I don't know how to add a second TRANSFORM statement to be included and grouped by month!

Code:
TRANSFORM Sum([Client Accounting].[Refund]) AS SumOfRefund
SELECT [Client Accounting].[Marketer]
FROM [Client Accounting]
GROUP BY [Client Accounting].[Marketer]
PIVOT Format([Closing Date],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

View 2 Replies View Related

Forms :: Inventory - Allow Users To Update Multiple Fields For Multiple Assets

Sep 25, 2014

I want to create a form that allows users to update multiple fields for multiple assets. Below is what I came up with:

Ideally, I'd like the subform to be filled in by having the user select multiple Assets from the S/N combobox field which would then auto-populate the "Type" field. Then they would fill out the appropriate fields they want edited in the top part of the form. They hit save and magic happens. This would also be nice because only assets they want edited would be displayed (easier on the eyes) and no distinguishing would be necessary. To do it this way, I know I would need to use a temp table but I wanna avoid using temp tables.

I know I can do this by adding a Yes/No field in the "Asset" table, setting the "Asset" table as the subform's recordsource, and then putting a checkbox in the subform and allowing them to check the assets that they want to edit (which would also allow me to sort it instantly so that checked Assets are at the top of the datasheet for easy viewing), but I would like to know if there's a way of accomplishing this without the use of checkboxes.

I know I could also use a listbox and that allows them to multi-select items, but I'm not sure if that allows me to group all selected items at the top of the listbox for easy viewing of selected items. Plus it would involve a lot of scrolling (there are over 2k assets).

View 2 Replies View Related

IMPORTING MULTIPLE FIELDS FROM MULTIPLE DATA SETS INTO A TABLE

Nov 16, 2006

I HAVE A DATASETS cSV TEXT FORMAT WHICH HAS A SELECTION OF FIELDS THAT NEED TO BE IMPORTED INTO A TABLE. USING THE ADVANCED IMPORT FACILLITY I HAVE BEEN UNABLE TO IMPORT THE DATA PLEASE HELP AS THIS IS FOR MY A-LEVEL STUDENTS.


THE FIELDS REQUIRED IN THE SESSION TABLE ARE,
Booking ID, Customer ID, Date Booking Made, Pickup Point, Payment Made

The CSV data set attached

tHANK YOU

SIMON

View 2 Replies View Related

Modules & VBA :: SQL - Select Multiple Fields From Multiple Unrelated Tables

Oct 28, 2013

A small issue I was wondering of for a few day . Is it possible in SQL query to SELECT multiple fields from multiple tables ? Example for the question is

Code:

dim my_var as String
my_var = "SELECT Emp_FName , Emp_LName , Emp_Adress " _
& " FROM Table1 " _
& " AND Emp_Date_Of_Payment , Emp_Sum_Of_Payment " _
& "FROM Table2 " _
& " WHERE Emp_ID = 3 "

Is this code actually valid in SQL gramatics , and is it usable if passed to a Recordset variable ( rs = CurrentDB.OpenRecordset(my_var) ) ? Just FYI - The two tables are not related and I want to keep them that way (If possible relate their records just via SQL/Vba )

View 7 Replies View Related

Multiple Fields Of Multiple Tables To One Table Query Or Report

Apr 12, 2013

I have 10 tables, 30+ fields on each table (every table has the same 'account number' field). I only need from 5 - 20 fields from each table. How do I get the certain fields from each table and put them in a table, query or report?

View 1 Replies View Related

Multiple Parameters Doesn't Work On Multiple Fields

Jun 27, 2006

I created the below query to come up with a new form. When I enter a single parameter, it works fine. When I modify the code and enter multiple patameters, it also works fine if I do not enter any information for the parameters. But once I enter one of the parameters information, then it does not come up with anything. I double checked and made sure it was typed in correctly. Is there a trick when entering multiple parameters on a query?


SELECT [JE 06 Log].[Operational Region Name], [JE 06 Log].[Period Name], [JE 06 Log].[Source System], [JE 06 Log].[Source Name], [JE 06 Log].[Category Name], [JE 06 Log].[Associated Category Name], [JE 06 Log].[JE Name], [JE 06 Log].[JE Base #], [JE 06 Log].Area, [JE 06 Log].[Line Description], [JE 06 Log].[Natural Account], [JE 06 Log].Description, [JE 06 Log].[JE Entry Date], [JE 06 Log].[Debit Amount], [JE 06 Log].[Credit Amount], [JE 06 Log].Amount
FROM [JE 06 Log]
WHERE ((([JE 06 Log].[Period Name])=[Enter Period]) AND (([JE 06 Log].[Source Name])=[Enter Path]) AND (([JE 06 Log].[JE Base #])=[Enter Base Number]) AND (([JE 06 Log].[Natural Account])=[Enter Natural Accnt])) OR ((([Enter Period]) Is Null) AND (([Enter Path]) Is Null) AND (([Enter Base Number]) Is Null) AND (([Enter Natural Accnt]) Is Null));

View 6 Replies View Related

Way To Have Multiple Distribution On One Field Without Creating Multiple Distribution Fields?

Mar 1, 2012

I am creating a CAD Drawing database / Distribution list. I can only seem to distribute one drawing i.e single field to one person.Is there a way to have multiple distribtion on one field without creating multiple distribution fields?

What I have is a database which contains Drawing Numbers - I need to create a report that shows where the drawing has been distributed to, with it's current revision status and the date is was sent.I am having trouble trying to use multiple revisions and mutiple people in the distribution list with one drawing.

View 4 Replies View Related

Multiple Fields

Jul 19, 2005

Hi All,

I have multiple fields on a form, does anyone know how I can make them unvisible without writing 30 times .visible = false.. Someone told me I could use the tag property.

Thanks in advance.

View 3 Replies View Related

Adding Multiple Fields

Dec 28, 2005

Hello, I have what I believe to be a very basic, albeit wordy question regarding an Access based mailing list that I am designing. For the scope of this project, I have 7 fields: Position (the position of the person recieveing the mailer, So far all I have is the "Principal", these are all schools) Name (The name of the school), Address, City, State, Zip and SchoolID (this is the primary key and will be hidden)
My question is: How can I add multiple positions per School (Name)? I need to add 1st through 6th grade teachers as well as the councilor to each location. So each of these people will be sent a mailer. Any help on this would be greatly appreciated. Feel free to ask any questions needed.

Thank you

View 11 Replies View Related

Fill Multiple Fields

Feb 11, 2008

I have an order form that requires me to change the current promotion we're running continually. I need to populate all rows based on the update changes of one textbox. Is this possible? Right now when I update the promotion text box, it only updates the text for row one.

View 1 Replies View Related

Multiple Fields To One Table

Nov 25, 2004

Hi There,

I have a question which is not so easy to discribe but maybe easy to answer, so i'm giving my best shot.
I'm making something to store information about patients. If made the forms en table with the wizard within access and some extra functions with VBA. The first problem i have is this:
I have to many control elements on 1 form (control boxes, I get a error message) so I need to split this form up into 2 forms. Other control elements or no option, because the input should be like this.
The information form both forms need to be kept together in the linked table as 1 record. But now I have split the form up into 2 forms I get 2 separated records. 1 record with the information from the first form and the other record with information from the second form. My question is what can I do the merge both records to one or maybe better to make sure that both forms only generate one complete filled record, so my table won't grow unnecessary big.

Please keep your answer as easy as possible so I can keepup. Thanks!

Greatings,


Pascal

View 4 Replies View Related

Multiple Valued Fields

Sep 10, 2007

I need to have a field that is labeled zones. This field can have anywhere from 1 to 7 or so values. The Values are numbered 1-15. If I have a person that operates in zones 2,3, and 4 I need to be able to have the annotated in the record so that when I want to see all the people operating in zone 2 it will recognize that Joe Smith works in zone 2, even though he also operates in zones 3 and 4. I need to do this in Access 2003 since that is what they have at work. I know that 2007 has multivalued fields but I don't have that version at work. So if I understand this right I create a separate table with headings Zone and Autonumber as the PK. Then I link that to the main table in a one to many relationship between the zone table(many) and the main table(one)? Then when I create a query that searches for all records that have a 2 in the zone it will find Joe Smith's record? Is this right? Thanks for your help. If there is an easier way please explain it to me. Thanks again.

View 14 Replies View Related

Count Multiple Fields

Jun 26, 2006

hi there,

I have been struggling over this the past few days and get no where. I am trying to count the number of times Yes appears in a few fields. This is what I have right now in design view:

Field1YesCount: Count(IIF([Field1] = True,1,0))

Field2YesCount: Count(IIF([Field2] = True,1,0))

Field3YesCount: Count(IIF([Field3] = True,1,0))

This doesnt seem to work, could someone please help.

Thanks

View 2 Replies View Related

Count Multiple Fields

Jun 26, 2006

hi there,

I have been struggling over this the past few days and get no where. I am trying to count the number of times Yes appears in a few fields. This is what I have right now in design view:

Field1YesCount: Count(IIF([Field1] = True,1,0))

Field2YesCount: Count(IIF([Field2] = True,1,0))

Field3YesCount: Count(IIF([Field3] = True,1,0))

This doesnt seem to work, could someone please help.

Thanks

View 3 Replies View Related

SQL To Search Multiple Fields

Jul 24, 2006

I have a search form, and it has 2 combo boxes, and 3 textboxes. I would like one of the textboxes to search 10 different fields for the inputted data. Along with that search all of the others must be able to be used to narrow down the criteria. How can I do this with SQL? Right now I have a select distinct, where, and I use And to include all 5 parameters. What can I do to use the one box to search numerous fields and still return options when coupled with the other search parameters. Thanks



Riley

View 13 Replies View Related

Update Multiple Fields At Once

Sep 6, 2007

Hey guys-
I have 2 identical tables. I want to update the data from Table1 to go into Table2. Each table has well over 70+ fields in them. Instead of handwriting out each [Table].[Field] in either SQL or the Designer- is there a shortcut to tell Access to grab all the fields from Table1 and update all the fields in Table2 (all the fields have the same name)? I just don't have the energy to type it all out- I figure there's got to be a way...

I know when you do an APPEND query in the designer- it will do this for you- but not the UPDATE query...
Thanks!

View 6 Replies View Related

Combo Box With Multiple Fields

Feb 8, 2008

Have been searching all morning & can't find solution (technique must be haywire)

Have created a combo box query with 3 fields, id-code-description
Objective is to select Code from combo box and populate Description field from the value in the combo box into another table

Have tried all sorts of techniques, none of which have worked

I am sure this has been answered a million times, but I just can't find it

Any help appreciated

View 7 Replies View Related

I Need To Search Multiple Fields

May 1, 2006

Hey guys I need some help, I have attached my database.

I need to search multiple fields.
I need to search from field strserialone - strserialtwelve.

Thanks for taking the time..

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved