Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:16:31+00:00 2026-06-06T12:16:31+00:00

ALTER PROCEDURE [dbo].[AmendInsertDuplicateFields] (@ReportID varchar(50)) AS BEGIN DECLARE @NewReportID VARCHAR(50) SET @NewReportID = NEWID()

  • 0
ALTER PROCEDURE [dbo].[AmendInsertDuplicateFields] (@ReportID varchar(50))
AS
BEGIN
    DECLARE @NewReportID VARCHAR(50)
    SET @NewReportID = NEWID()

    INSERT INTO [MVCOmar].[dbo].[PrideMVCCollisionBegin]
           ([ReportID], [LocalIncidentNum], [version], [MTOReferenceNo], [Submitted]) 
       SELECT 
          @NewReportID, [LocalIncidentNum], [version], [MTOReferenceNo], [Submitted] 
       FROM 
          [MVCOmar].[dbo].[PrideMVCCollisionBegin] 
       WHERE 
          [ReportID] = @ReportID;

I would like to take the result that I get for version, convert it from string to int type, add one, convert back to string, and store it.

I acknowledge that version should be int and not string type. I also acknowledge that an even better method of accomplishing this would be to set properties to increment by one.

I can’t do either of those option for the time being because my priorities are different right now, I am time limited, the code is very old, and written by numerous people which carried poor coding habits.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:16:33+00:00Added an answer on June 6, 2026 at 12:16 pm

    you don’t need to convert it, run this, there will be an implicit conversion

    SELECT '1' + 1
    

    That returns 2

    In your case you can just do [version] + 1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

--Stored procedure ALTER PROCEDURE [dbo].[Test] @USERID varchar(25) AS BEGIN SET NOCOUNT ON IF NOT
ALTER PROCEDURE [dbo].[STL_ADDNEWROLE](@ROLENAME VARCHAR(100), @STATUS BIT) AS BEGIN SET NOCOUNT ON; IF(@ROLENAME IS NULL
ALTER PROCEDURE dbo.ModeratorSpamDeleteComment DECLARE @CommentID int; AS BEGIN DELETE Comments WHERE CommentsID=@CommentID END It
ALTER PROCEDURE [dbo].[test] @tour int, @tourname varchar(50) OUTPUT, @tourdepartures varchar(50) OUTPUT AS BEGIN --
ALTER PROCEDURE dbo.Articles_InsertArticle @Article nvarchar(MAX), @UsersID uniqueidentifier AS INSERT INTO Articles (UsersID,Article,PageNumber) SELECT @UsersID,
The code is as follows: ALTER PROCEDURE dbo.pdpd_DynamicCall @SQLString varchar(4096) = null AS Begin
ALTER PROCEDURE [dbo].[GetDocumentsAdvancedSearch] @SDI CHAR(10) = NULL ,@Client CHAR(4) = NULL ,@AccountNumber VARCHAR(20) =
ALTER PROCEDURE [dbo].[GetTimeSheetsAttendance] @WhereClause varchar AS EXEC ('Select vwEmployeeList.ID,vwEmployeeList.Code, tbGNClient.FName + '' '' +
I have the following stored procedure ALTER PROCEDURE [dbo].Test AS BEGIN CREATE TABLE ##table
I have this stored Proc: ALTER Procedure [dbo].[GetWebinars] ( @GroupingCode varchar(max) = 'AVM', @ItemNumber

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.