Find Jobs
Hire Freelancers

Build an SQL Query to help with billing

$30-250 USD

Completed
Posted over 5 years ago

$30-250 USD

Paid on delivery
We maintain approximately 100 databases in SQL 2008. We need to bill each month based on the number of records added to each database. We have been doing this manually up until now. I would like to write a SQL script that will allow my (inexperienced) user to 1) Create a table in the Billing database named by the MonthYear. 2) Set a biggining/ending date range for us to bill. 3) Run a series of SQL scripts that will populate this single table with all of the information we need for billing. Part of the issue is that we can only bill for a database when the month is complete. We may bill for database 1 on Oct 5th because it will be complete through September data. Another database may not bill until Oct 15th because we would not have completed September until then. I have the beginnings of a script attached. It's getting a little too complicated for me with all of the @variables involved. Hopefully it shows you the direction I'm headed. My specific question begins on row 78. I understand that a utility of some sort would be better, however, SQL is the only scripting language I understand. I will need to be able to make changes down the road as we modify our process, add/remove county databases etc. This has to be accomplished in SQL Server query.
Project ID: 17866603

About the project

9 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi I am a database expert with 15 years experience in handling MS SQL databases. I have worked as DBA for large ERP databases and use to write and do performance tuning for SQL queries, procedures and triggers. I have a few questions, basically to make sure I understand the requirement well. You mentioned that you have 100 databases, and don't you want to set the billing for all 100? In the script I see only a few databases like Adair, NITkootenai, Elbert etc. If you want all 100 to be done, an easy option to make the script not long is to put all database names in a table and then loop this table to generate 100 SQL statements. To find the usage are you looking only at the two tables tbldocumentinfo and tbluserfield? These two tables are uniform across all databases? No need to consider any other tbales in these databases? If so, you already have written the script to get the count from these tables. May be another looping to generate 100 update statements each should do the job? Or can you tell me what exactly is not working with your current script. Thanks Roni
$120 USD in 3 days
5.0 (77 reviews)
6.4
6.4
9 freelancers are bidding on average $138 USD for this job
User Avatar
Hi There I've excellent programming and development skills and knowledge. I can provide an efficient, perfect, well documented development of your Programming and Computer project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif
$200 USD in 5 days
4.9 (44 reviews)
5.3
5.3
User Avatar
i ahve all the skils required for the projet cand i can deliver it on time and with all the requirements implemented
$122 USD in 3 days
5.0 (27 reviews)
5.0
5.0
User Avatar
Hello? How are you>? I have good skills in this. so I can help you. You might check my reviews. Hope to work with you. Thank you.
$133 USD in 3 days
4.6 (10 reviews)
4.5
4.5
User Avatar
Hi sir i can write this script fir your user. i have over 6 years of experience with SQL. i can write this script. thanks Manzoor
$88 USD in 5 days
4.4 (8 reviews)
4.2
4.2
User Avatar
I am software developer with 4.5 years experience have knowledge SQL server queries,Trigger ,Store proceduer and sql function. can i have some sample database.
$111 USD in 3 days
5.0 (1 review)
0.6
0.6
User Avatar
Hi i can work this for you i have all the skills to realise it i study for 2years the sql server i know must of instructions sql. thanks for choosing me
$138 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, I would like to work in your sql query. But i dont understand very well what you need.. In the example you wrote, you collect all countries with X amount to bill but you do nothing with them after that. Well, write to me and we can deal with that query. Diego.
$111 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Coeur D Alene, United States
5.0
30
Payment method verified
Member since Jun 5, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.