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
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 my domain expertise in the ERP, when ever I have a business requirement, I can easily look into a database, identify the required tables and write the required query for that.
Please let me know a convenient time to connect on team viewer and do this.
Thank you
Roni
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 by me.
Thanks in advance.
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
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 this job for you.
Thanks, Andriy
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 me if you consider my proposal.
Regards,
Thai (Mr.)
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 of high skilled professionals is suitable to perform complex responsibility with tight deadlines and makes us the most preferred company for outsourcing.
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 years and have worked on various projects involving the optimization of SQL code and development of various complex code
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.
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 work dependant upon new calculations desired.
Regards
Mike.