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

$34 USD 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

$28 USD 1日以内
(27件のレビュー)
6.4
riskypathak

A proposal has not yet been provided

$24 USD 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

$25 USD 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 もっと

$105 USD 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

$25 USD 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 もっと

$20 USD 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 もっと

$30 USD 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

$25 USD 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.

$25 USD 1日以内
(0件のレビュー)
0.0
naveen3992

A proposal has not yet been provided

$25 USD 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 もっと

$25 USD 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 もっと

$20 USD 1日以内
(0件のレビュー)
0.0
arvind2117

A proposal has not yet been provided

$25 USD 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.

$35 USD 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 もっと

$31 USD 1日以内
(0件のレビュー)
0.0