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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:19:25+00:00 2026-05-25T20:19:25+00:00

The stored procedure work but update nothing!! I think is about those statements if

  • 0

The stored procedure work but update nothing!! I think is about those statements
if @… <>null .

Thank for Help

   ALTER PROCEDURE [dbo].[sp_UpdateLocation]

    @id_Location char(6),
    @debut_Location smalldatetime,
    @premier_Paiement smalldatetime,
    @nombre_Mensualité char(2),
    @id_Client char(6),
    @no_Termes_location char(6),
    @niv char(20)

AS

BEGIN


IF @nombre_Mensualité  <> null
   BEGIN 

        DECLARE @valeur_auto smallmoney;
        DECLARE @paiment_Mensuel smallmoney;
        SET @valeur_auto= (SELECT valeur FROM Véhicules where niv=@niv )
        SET @paiment_Mensuel= (@valeur_auto/@nombre_Mensualité)

        Update Location  
        SET paiment_Mensuel=@paiment_Mensuel,nombre_Mensualité=@nombre_Mensualité
        WHERE (@id_Location=id_Location)
    END

IF @debut_Location <> null
    BEGIN   
        Update Location  
        SET debut_Location=@debut_Location
        WHERE @id_Location=id_Location
    END

IF @premier_Paiement <> null
        BEGIN   
            Update Location  
            SET premier_Paiement=@premier_Paiement
            WHERE @id_Location=id_Location
        END

IF @id_Client <> null
        BEGIN   
            Update Location  
            SET id_Client=@id_Client
            WHERE @id_Location=id_Location
        END

IF @no_Termes_location <> null
        BEGIN   
            Update Location  
            SET no_Termes_location=@no_Termes_location
            WHERE @id_Location=id_Location
        END

IF @niv <> null
        BEGIN   
            Update Location  
            SET niv=@niv
            WHERE @id_Location=id_Location
        END



      END

      select*from Location
  • 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-25T20:19:26+00:00Added an answer on May 25, 2026 at 8:19 pm

    Instead of <> null try IS NOT NULL.

    MSDN is a good resource to consult on these types of issues.

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

Sidebar

Related Questions

I have stored procedure which update Customers and a datagridview to work with the
I'm trying to get a stored procedure to work for a co-worker who is
I am creating a stored procedure in my sql work bench. I am modifying
I've only been able to see this work with a stored procedure and I
I have a stored procedure that works in the mysql> terminal, but when I
I have this stored Procedure in MS SQL2008 (C#) ALTER PROCEDURE UpdateProducts @ProductID INT,
I am trying to get an insert stored procedure to work on an entity
I simply want to execute a MySQL stored procedure. But I want to use
I am currently having problems calling a stored procedure async from within a insert-update-trigger.
We're having problem with a huge number of legacy stored procedures at work. Do

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.