SQL Stored Procedure needs modified
$10-30 USD
货到付款
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
项目ID: #7291317
关于项目
有33名威客正在参与此工作的竞标,均价$29/小时
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
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
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 更多
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
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
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.
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 更多
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 更多
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.