I need a SQL Server 2000 stored procedure created that will return a record set that shows the previous month’s sales of each of my inventory items for the prior month. One of the included attachments is a sql view named v_SOP30300_SOP30200. It returns the records from our accounting database that you will need to build the stored procedure. I have included both of the tables that this view selects records from.
The stored procedure should be named sp_PrevMonthsItemSales
The columns the stored procedure should include are:
Item Number
Item Description
Quantity Sold
Extended Price
You should do a group by on the item number and sum the Quantity Sold and Extended Price columns.
I need the Extended Price column formated using the sample below.
Convert(varchar(50), Cast(DOCAMNT As Money), 1) As [Document Amount],
This stored procedure will be automatically run on the first Wednesday of each new month. I need you to calculate the first day and last day of the previous month inside the stored procedure and use them as parameters. The view contains a column named DOCDATE. Use that for the record date.
Please feel free to post any questions you have on the rent a coder site and I will respond asap.
## Deliverables
1a) SQL Server Stored Procedure as described above.
1b) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
_SQL Server 2000 or 2005_