SQL Stored Procedure needs modified

已关闭 已发布的 Mar 11, 2015 货到付款
已关闭 货到付款

I have the following stored procedure below currently. What I need is if [login to view URL] > 0, and [login to view URL] = -1, then run the following stored procedure as planned.

But if [login to view URL] = 0 and [login to view URL] = -1, then I need a 2nd loop that I can modify the calculated equations on.

Note, there are several stored procedures, and I'm pretty sure this is the only one that needs modified, but I dont think the [login to view URL] is carried over from the other procedures, into this procedure in order for the procedure to know, I could be wrong here. The [login to view URL] I'm sure has something to do with it, but I dont know how to write the needed code to add the 2nd loop if the SupplierID = 0.

I did have this posted before, and a programmer looked at it, and while he was a nice guy and helpful, we werent able to really communicate what I needed properly and I had to undo the changes.

You will need to use teamviewer in order to connect, and make the changes, then I'll have to add some items to test, which might take overnight, so payment and testing will take about 12 hours after you've made the necessary changes.

USE [StoneEdge]

GO

/****** Object: StoredProcedure [dbo].[_BoydUpdateProfitPriceForSKU] Script Date: 3/11/2015 6:52:13 PM ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

-- =============================================

-- Author: <Author,,Name>

-- Create date: <Create Date,,>

-- DescriptiON: <DescriptiON,,>

-- =============================================

ALTER PROCEDURE [dbo].[_BoydUpdateProfitPriceForSKU]

@localSKU varchar(50)

AS

BEGIN

SET NOCOUNT ON;

--amazon selling price to be cheapest but make sure we're profitable

UPDATE I

SET [login to view URL] = Round(

CASE

WHEN [login to view URL] < ([login to view URL] - 3.99) THEN ([login to view URL] - 4.00) ELSE ([login to view URL] + 2)

END , 2, 0),

[login to view URL] = Round(

CASE

WHEN [login to view URL] < ([login to view URL] - 3.99) THEN (([login to view URL] - 4.00) - [login to view URL]) ELSE 2

END , 2, 0)

FROM Inventory I

INNER JOIN InventorySuppliers ISS ON [login to view URL] = [login to view URL]

AND [login to view URL] = 6

WHERE [login to view URL] = @localSKU;

-- amazon selling selling price minimum $.01

UPDATE I

SET [login to view URL] =

CASE

WHEN [login to view URL] = 0 THEN .01 ELSE [login to view URL]

END,

[login to view URL] =

CASE

WHEN [login to view URL] = 0 THEN .01 ELSE [login to view URL]

END

FROM Inventory I

INNER JOIN InventorySuppliers ISS ON [login to view URL] = [login to view URL]

AND [login to view URL] = 6

WHERE [login to view URL] = @localSKU;

UPDATE I

SET [login to view URL] =

CASE

WHEN [login to view URL] = 0 THEN ([login to view URL] + 2) ELSE [login to view URL]

END,

[login to view URL] =

CASE

WHEN [login to view URL] = 0 THEN ([login to view URL] + 2) ELSE [login to view URL]

END

FROM Inventory I

INNER JOIN InventorySuppliers ISS ON [login to view URL] = [login to view URL]

AND [login to view URL] = 6

WHERE [login to view URL] = @localSKU;

END

微软 SQL 服务器 SQL

项目ID: #7291317

关于项目

33个方案 远程项目 活跃的Apr 18, 2015

有33名威客正在参与此工作的竞标,均价$29/小时

rinsadsl

A proposal has not yet been provided

$34USD 在1天里
(66条评论)
6.7
yugolancer

I could help you to fix this stored procedure. Let me know when you have a minute so i can access your SQL Server instance via Team Viewer

$28USD 在1天里
(27条评论)
6.4
riskypathak

A proposal has not yet been provided

$24USD 在1天里
(61条评论)
7.0
codetod

Hi I am a database expert with 12 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. With 更多

$30 USD 在3天内
(77条评论)
6.4
karunakartiwari

A proposal has not yet been provided

$40 USD 在0天内
(43条评论)
6.2
manhpham

Hello, Good day to you. I am SQL expert. I understand your requirements. I am willing to help you do this project right now. Please contact me. Thank you

$25USD 在1天里
(44条评论)
5.6
idragon712

Hi, I've many experiences in data base management system. And I've developed business management aid project. So I acquired many dbms knowledge and practice performing above project. I want your project completed b 更多

$105USD 在1天里
(3条评论)
4.1
vinod150987

Hi I am Vinod Kumar. I am working as Senior Software Developer in IT company. I have 4 + years experience in .NET with C#,VB,ASP.NET, Web Service, WCF, Javascript, JQuery, SQL, XML ,XSLT and HTML

$25USD 在1天里
(8条评论)
3.9
andriy3s

Hi, I'm high rated coder from Ukraine. I've more than 12 years in the experiences of the database developing. My skills are includes MS SQL, PostgreSQL, SQLite, MySQL, MS Access, Sybase etc. I'd like to do th 更多

$20USD 在1天里
(14条评论)
3.4
thaingo84

Hello, I understand roughly requirement, only the calculated equations for 2nd loop, how is it? I can do this job and available in next 4 hours. If this task is not so urgent then I can help it. Please message 更多

$30USD 在1天里
(1条评论)
0.6
slgolamrabbi

I would like to do this.I have team viewer so no problem with that. You can pay me after 12 hour but you have to create a milestone first Thank you

$25USD 在1天里
(0条评论)
0.0
rohitkarwa

A proposal has not yet been provided

$30 USD 在2天内
(0条评论)
0.0
kaushalbhojani5

Hi There, I have plenty of experience in resolving MSSQL (T-SQL query) issues .I have partly understand your problem. I can take up this let me know best time to talk.

$25USD 在1天里
(0条评论)
0.0
naveen3992

A proposal has not yet been provided

$25USD 在1天里
(0条评论)
0.0
aQ89

A proposal has not yet been provided

$30 USD 在3天内
(0条评论)
0.0
zenesystechno

ZeneSys Technologies is one of the fastest growing high skilled Database Management and IT services provider companies in India. We offer flexible solution for SQL Services, suitable to variety of customers. Our pool o 更多

$25USD 在1天里
(0条评论)
0.0
puneet7999

I am an experienced SQL developer and have a good knowledge of various advanced sql functions. I have worked on both the systems i.e. analytical as well as transactional systems. I have been in this field for many ye 更多

$20USD 在1天里
(0条评论)
0.0
arvind2117

A proposal has not yet been provided

$25USD 在1天里
(0条评论)
0.0
sergiogustavo

I'm a 7 years experienced developer in SQL Server & .NET I can help you to redesign the stored procedure if it's necessary in order to cover all of the cases you need to.

$35USD 在1天里
(0条评论)
0.0
mndata

Hi, this is part of what I do for a living as a Senior Data Warehouse / Business Intelligence Consultant. It should be very easy. Also possible without branching the stored procedure.... Either solution would wo 更多

$31USD 在1天里
(0条评论)
0.0