I would like to create a sales query for the past 12 months that can be reapplied once a month.I would like to do the whole thing with the query generator, but I can not find a table from which the sales emerge. I am familiar with the sales analysis, but I would like to simplify the whole thing. Is there a corresponding table at all or is it possible to create one?
If i understand correctly,
are you looking for .ORDR ? this is the sales order header table.
there is also .RDR1 which contains the row data.
if you go to view, then turn on 'system information' table/field details will be displayed in the bottom left.
regards,
Related
Probably get shot for posting this again but last attempt was put on hold so sorry in advance. i am very new at this so apologies if its a simple answer;
I created a table with name of purchaser, items purchased, date of purchase and cost of purchase. From that i wanted to create a report that would show each purchasers name only once with a combined total cost of all purchases.
I created a query that did just that using only the purchasers name and the total cost of their purchases. I then created the report from that query.
The report shows each name once with a total cost of purchases which was great except for the query continually adds those total purchases without the ability to select a date range and likewise the report shows the same info.
When i add the purchased date to the query/report so i can filter between 2 date ranges it then shows each name "X" amount of times with a total for each purchase made which is not what i am looking for as this ends up with a long report.
Hope this makes more sense than my last attempt at this question. I am very new at this so a simple answer would be great.
Thanks in advance
You need to get two parameters for the query, say [Start] and [End].
You need to add the date column twice so that it can be compared to [Start] AND [End]
You need to add the date column (on both occasions) with a Total "Where"; this tells access that the column has no other purpose than to impact a WHERE-constraint on the base dataset.
If you run into trouble, take the SQL below, correct all names in it, paste it into the query's SQL view, and then see what the design view looks like!
SELECT table.customer, Sum(table.price) AS sum
FROM table
WHERE (((table.date)>=[Start]) AND ((table.date)<=[End]))
GROUP BY table.customer;
I have a 2 access 2007 tables with the following fields:
Table 1: Loan Release Table
ReleaseDate as Date
Maturity as Date
MemberName as Text
MemberNo as Text
Term (in months) as Number
Mode (M/Q/Semi-Monthly) as Text
LoanType as Text
LoanAmount as Currency
LoanCode as Text
Table 2: Payments Table
ReceiptNo as Text
DatePaid as Date
MemberName as Text
MemberNo as Text
LoanCode as Text
LoanReceivable as Currency
InterestPaid as Currency
I would like to ask on how to use Query to create a temporary table that will display Members that should pay on current date or a specified date base on their Term, Mode of Payment and Loan Type (Regular Loans every 30 days to pay, Special Loans every 45 days to pay) and their remaining balance.
Here's my First Attempted Query: I tried to subtract 30 days from Current Date and it obviously gave me just the transactions last month. I would like it to list all transactions including those for example Member with Regular Loan 12 month term on their 3rd monthly payment, Member with Special Loan that is due today.
I am thinking of creating another table that contains the schedule of payments of every Loan released and then go from there.
Is there another way than this? Like a Query that can be run everyday without the need for a bulky ScheduleOfPayments table?
I'm an office clerk who 'graduated' from Excel and a novice using Access at worst and I'm not afraid of VBA codes if that is necessary.
If you know of a better way of doing this, please do tell me or point me in the right direction. I'm all for learning new things and having read and learned a lot from stackoverflow before, I am sure that with your help, my question is as good as solved.
Thank you guys for reading my inquiry.
You have here two solutions:
You can write a procedure that will, when needed, calculate\generate a matrix containing payment schedule for each loan and compare it to payment done.
You can write a procedure that will, when a loan is created, generate corresponding records in a payment schedule table. further comparison will be done between the ScheduledPayment table and the Payment table.
So basically you have to manage a similar set of data, either as a calculated/on the fly matrix or as a permanent set of data kept in a table.
The second version is by very very far the most effective one. You think of it as bulky but it is exactly the opposite, and indeed what is done every time you get a loan from a bank, where your banker will let you sign the reimbursement schedule.
The table solution will allow you to make use of all querying facilities, while the calculated solution will force you to write specific procedures each time you'll want to do some data mining. Just think about a question like "What are the expected reimbursements for the month of April 2014?". Answering this question with the ScheduledPayment table will be as easy as getting a cafe out of your nespresso machine. The same answer without the ScheduledPayment table will be like having to do the whole coffee production process before getting your cup ready.
Wonder if anyone has done this before and what solution you came up with?
I have a Stored Proc that basically is a financial aged debtors query. I have added params to it so that you can select the Start Date, Frequency and Period length of the query. e.g. I could pick 12 months back from TODAY or 01/01/2012 or 4 Quarters back or 1 year back depending on the detail of the output I wish to see.
All well and good and when I run it in SQL it is lovely and works beautifully. I have pivoted the data within the SP in different ways depending on the Period param so that the columns show correctly (i.e. Shows the month name column for months, Quarter name for quarters etc etc.) so the pivot is conditional on the input parameter.
As I say in SQL it is a beautiful thing... now how the hell do I display it in SSRS!? :o)
As the PIVOT is conditional I can't see the available fields and I've got to a point where I can't think anymore of a way around it.
Any help appreciated!
Assuming I got you right, there is an option to place the entire SP in the Dataset.
In the dataset properties , change the query type to Store Procedure.
Hope it helps for you...
Basically, I've been trying to make this query work for a while in Access and it's really frustrating me so instead of playing around with the criteria, I've decided to just do it in SQL instead but I can't quite figure out how to do this bit.
What I need to do is create a query that shows which members haven't returned an item that they're currently taking out on loan. If possible I'd like to include a calculated field to state the date is was due back and how many days late it is.
The fields I'm using are as follows;
Table = Loan
Toy Name
Hire Date
Duration (in days)
Returned Date (if it hasn't been returned, the cell is blank)
Table = Toy
Purchase Price
Hire Price
you wrote:
a query that shows which members haven't returned an item
your table does not have members in it. secondly table toy have nothing related to toy like toy name or something. Please provide further detail of tables.
one more question what is the meaning of blank? Is it Null or blank string?
I need to model a rather complex pricing structure for some of our products.
Today we lookup the prices manually. Here's a picture with explanations of the "matrix" that we use today: Sample model (sorry for the link - but I'm not allowed to post images because I've just opened my account.)
Now I need to transfer this model to a RDBMS system (SQL Server 2008 R2). The entry point when looking up a price is the Category, then the yearly interval and finally the interval depending on how many products we're selling on this order. The result of the query should be two prices.
Do you have any suggestions on how to model this? I was thinking of modeling it as a matrix with a RowNumber, CellNumber and a CellValue. But then I need another table for describing what is contained in each cell (by referencing the row and cell numbers). If doing that, I could just include the prices in that description table. But that doesn't seem like the best solution.
Do you have any hints/solutions on how to model this problem the best way?
I think I would make something like this:
Categories are separated into its own table.
Each row in the price table are uniquely identified by the category and starting point of the sold and shipped range. I don't think you would need to specify ending point in the table (since the end point of a range should be the starting point of the next range minus one).
Edit: With this model, you will need to add a row in the Prices table for each combination of category, units sold-interval and units shipped-interval, but right now I can't think of an easier way.