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 950369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:33:15+00:00 2026-05-15T23:33:15+00:00

ALTER PROCEDURE [Lending].[uspHMDALarIncomeGet] (@ApplicationId int) AS BEGIN SET NOCOUNT ON SET TRANSACTION ISOLATION LEVEL

  • 0
ALTER PROCEDURE [Lending].[uspHMDALarIncomeGet] (@ApplicationId int)
AS
BEGIN
    SET NOCOUNT ON
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

    -- Total Income Data
    DECLARE @ApplicantId int = (SELECT AT.ApplicantId FROM Lending.Applicant AT WHERE AT.ApplicationId = @ApplicationId)

    SELECT
    I.Amount
    FROM Lending.Income I WHERE I.ApplicantId = @ApplicantId

END

Do you guys know how this proc can be written to succeed in 05?

-Scott

  • 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-05-15T23:33:16+00:00Added an answer on May 15, 2026 at 11:33 pm

    SQL2005 does not have the syntax to declare and assign a variable in the same statement. You would need to change

      DECLARE @ApplicantId int = (SELECT ...
    

    To

      DECLARE @ApplicantId int
    
      SELECT  @ApplicantId = AT.ApplicantId 
      FROM Lending.Applicant AT 
      WHERE AT.ApplicationId =   @ApplicationId
    

    Edit:

    It’s just occurred to me that I might have changed the semantics a bit there if there can ever be more than one row matching AT.ApplicationId = @ApplicationId.

    DECLARE @ApplicantId int
    
    SET  @ApplicantId = (SELECT AT.ApplicantId ...
    

    Would retain the original semantics and cause an error in that event.

    • 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
here's my stored procedure. ALTER PROCEDURE [dbo].[SearchIngredients] @Term NVARCHAR(50) AS BEGIN SET NOCOUNT ON;
ALTER PROCEDURE [dbo].[AmendInsertDuplicateFields] (@ReportID varchar(50)) AS BEGIN DECLARE @NewReportID VARCHAR(50) SET @NewReportID = NEWID()
Here is my sample: ALTER PROCEDURE EmpFirstName @myParam int, @empFName varchar(20) output AS BEGIN
ALTER PROCEDURE GetSingersGenere (@SingerData ntext) AS BEGIN DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT,@SingerData
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 --
stored procedure : alter PROCEDURE usp_dailyjobwisereport_dayshift as /* exec usp_dailyjobwisereport_dayshift */ SET NOCOUNT ON
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER Procedure [dbo].[spGetQualityReport] ( @providerKey INT

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.