Build an SQL Query to help with billing

Concluído Postado há 5 anos Pago na entrega
Concluído Pago na entrega

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.

Programação de Banco de Dados Microsoft SQL Server SQL

ID do Projeto: #17866603

Sobre o projeto

9 propostas Projeto remoto Ativo em há 5 anos

Concedido a:

codetod

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 Mais

$120 USD em 3 dias
(77 Comentários)
6.4

9 freelancers estão ofertando em média $138 nesse trabalho

urmate

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 re Mais

$200 USD in 5 dias
(44 Comentários)
5.3
twentyten10

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 dias
(27 Comentários)
5.0
polarjin2017

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 dias
(10 Comentários)
4.5
ManzoorH

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 dias
(8 Comentários)
4.2
ibrahim20

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 dias
(1 Comentário)
0.6
amrousmed

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 dias
(0 Comentários)
0.0
diegoanazonian

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 Mais

$111 USD in 3 dias
(0 Comentários)
0.0