Terminé

Build an SQL Query to help with billing

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.

Compétences : Programmation de bases de données, Serveur SQL Microsoft, SQL

en voir plus : getafreelancer message sql query help needed, build sql filter html page, sql statements help, invoice system database design, invoice database structure, billing system database schema, invoice database table structure, invoice data model, mysql invoice database example, sql invoice example, invoice table design, costs build sql website, build sql server database driven photo gallery website, sql organization parent child query, sql server parent child query tree, sql 2008 bids cusom query, sql parent child table query, sql parent child relationship query, sql stored procedure loop query, sql query help

Concernant l'employeur :
( 23 commentaires ) Coeur D Alene, United States

Nº du projet : #17866603

Décerné à:

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 Plus

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 3 jours
(58 Commentaires)
5.9

11 freelance font une offre moyenne de $150 pour ce travail

truongnguyen86

Hello there, i'm expert on writing complex queries to gather data information, the way you're using is correc with dynamic SQL but to loop for 100 database we need to go with while loop to gather the data information a Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 5 jours
(149 Commentaires)
6.5
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 Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 5 jours
(39 Commentaires)
5.2
sky930320

Dear Sir. Glad to meet you. I'm very interested in your job post. I've full experience in database management. Please Hire me. I'll do my best, will make you pleasure with my work. Thank you. Relevant Skills Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(2 Commentaires)
4.9
twentyten10

i ahve all the skils required for the projet cand i can deliver it on time and with all the requirements implemented

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(18 Commentaires)
4.6
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.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(4 Commentaires)
3.6
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

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 5 jours
(1 Évaluation)
1.3
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

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 10 jours
(0 Commentaires)
0.0
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 5 jours
(0 Commentaires)
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 Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0
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.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0