Find Jobs
Hire Freelancers

Quick SQL Server Code Fix, Just a Couple Minutes Of Your Time To Score Quick Feedback

$30-250 USD

Concluído
Publicado há quase 10 anos

$30-250 USD

Pago na entrega
Hello coders I am having a SQL server issue that I think is easy to fix but I dont have the knowledge needed to write the query myself so I am branching out and hoping one of you can help. I have added the current code below and I think the best way to do this is to explain what I am trying to do and then what the code is doing now. There is a reporting stored procedure and it feeds in some data from my database into a text file. So lets say I run a report for date 4-25-2014. This query below is one of handful that the stored procedure would query and spit out results. Right now this specific example below would say on all games prior to 4-25-2014 show me the results where the closing_line column of that game was negative and the team won the game. That one works perfectly and returns the right results based on the 2.5 closing_line value on 4-25-2014. date team site closing line opp team 4/29/2014 CHI home -3.5 WAS 4/27/2014 CHI away 2.5 TB 4/25/2014 CHI away 2.5 MEX 4/22/2014 CHI home -5 SAN 4/20/2014 CHI home -4.5 PHI /******** F A V O R I T E *************/ IF EXISTS(SELECT game_rec_id FROM Game WHERE team = @TeamL AND CAST(date_played AS date) = CAST(@GameDateL AS date) AND closing_line < 0) BEGIN -- ATS FAVORITE (CURRENT TEAM) SELECT @Wins = COUNT(game_rec_id) FROM Game WHERE team = @TeamL AND date_played BETWEEN @CurrentSeasonStartDate AND @GameDateL - 1 AND ats_margin > 0 AND closing_line < 0; SET @AtsFavoriteCurrentSeason = CAST(@Wins AS varchar(8)) + '-' + CAST(@Loses AS varchar(8)) + '-' + CAST(@Draws AS varchar(8)); What I want to do is write another query with those exact same conditions below except instead of using the value of closing line for that game date, I want to use the closing_line data from 1 game prior. So in this case if the report was on 4-25-2014, I would want to know the value of closing_line column on the previous teams game which would be 4-22-2014 and that value would be -5. So the project is this, rewrite this section below so that it will query the prior games closing_line column. This should be pretty easy for any sql server coder and I would like to hopefully have this done tonight since we are talking about just a handful of lines to code. You can send me the edited code, I will run it through the database, check to make sure it is producing the correct results and this is all I need to close out the project. Should be a very easy project and way to get some easy quality feedback for your profile. I am here if you have any questions. /******** F A V O R I T E *************/ IF EXISTS(SELECT game_rec_id FROM Game WHERE team = @TeamL AND CAST(date_played AS date) = CAST(@GameDateL AS date) AND closing_line < 0) BEGIN -- ATS FAVORITE (CURRENT TEAM) SELECT @Wins = COUNT(game_rec_id) FROM Game WHERE team = @TeamL AND date_played BETWEEN @CurrentSeasonStartDate AND @GameDateL - 1 AND ats_margin > 0 AND closing_line < 0; SET @AtsFavoriteCurrentSeason = CAST(@Wins AS varchar(8)) + '-' + CAST(@Loses AS varchar(8)) + '-' + CAST(@Draws AS varchar(8));
ID do Projeto: 6310120

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 10 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Greetings! This is Amine and I work as a IT consultant for several key accounts in my country (Morocco). Also, I am a Microsoft Certified Professional in Implementing a Data Warehouse with SQL Server 2012. I have experience in both application development and Business Intelligence projects. I will be pleased to work with you on this project. Please feel free to check my Linkedin profil ([login to view URL]) or to start a discussion to talk about details. Thank you!
$100 USD em 0 dia
5,0 (3 avaliações)
2,7
2,7
3 freelancers estão ofertando em média $85 USD for esse trabalho
Avatar do Usuário
Hi, I have gone through your requirements.I am a DBA at CMMI-5 Level company since August 2010.I am working on MySql,SQL Server,Oracle database, I can do your job confidently. I am very much Interested to do your work,Please revert me if you have any concern .I am ready to start now.
$105 USD em 1 dia
4,4 (11 avaliações)
4,5
4,5
Avatar do Usuário
Let's resolve it now. I am a microsoft certified solution developer(MCSD) with more than 6 years of experience in Software design, development, Implementation, Trouble Shooting, and Testing. I have strong experience in developing Software applications using Asp.Net,VB.Net,C#.Net, MVC,HTML5, DevExpress and Telerik Controls, SQL Server, JQuery, Javascript, JSON, XML, AJAX. I would like to provide you best quality work in timely manner with affordable rates.
$30 USD em 1 dia
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
Hi, i have seen your problem of server code .i can resolver it very quickly.i have good knowledge of sql server .we can discus smore Thank you
$50 USD em 0 dia
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
Chicago, United States
5,0
243
Método de pagamento verificado
Membro desde jul. 31, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.