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

  • Home
  • SEARCH
  • 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 7657321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:00:02+00:00 2026-05-31T13:00:02+00:00

UPDATE Subscription.dbo.RefillSubscriptionHeader AS H INNER JOIN Subscription.dbo.RefillSubscriptionDetail AS D ON D.reSubHeaderId = H.reSubHeaderId SET

  • 0
UPDATE Subscription.dbo.RefillSubscriptionHeader AS H
INNER JOIN Subscription.dbo.RefillSubscriptionDetail AS D 
ON D.reSubHeaderId = H.reSubHeaderId 
SET H.isActive2 = '0', D.isActive = '0'
WHERE reItemID = '56'

In the above query I am trying to join 2 tables and update the IsActive and IsActive2 columns.

Right now when I do a SQL syntax check I get

Incorrect syntax near the keyword ‘AS’.

If I cannot update 2 columns from 2 tables the best bet would be to update the H table.

  • 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-31T13:00:04+00:00Added an answer on May 31, 2026 at 1:00 pm

    Because an UPDATE statement will only hit one table, your best bet would then be

    UPDATE H
     SET H.isActive2 = '0'
    FROM Subscription.dbo.RefillSubscriptionHeader AS H
    INNER JOIN Subscription.dbo.RefillSubscriptionDetail AS D 
    ON D.reSubHeaderId = H.reSubHeaderId 
    WHERE reItemID = '56'
    

    Of course, you can put both updates in one TRANSACTION, and if you provide the right TRANSACTION ISOLATION LEVEL you can still ensure the “atomicity” of the operation

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

Sidebar

Related Questions

UPDATE UPI_ATTRIBUTE SET SITE_INC ='0' WHERE USER_PROFILING_NAME IN ('CAR_IMPLICIT','CAR_EXPLICIT') Above is my query that
Update: Is there a way to achieve what I'm trying to do in an
The line cmd.ExecuteNonQuery(); cmd.CommandText CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data
I am trying to force EGORefreshTableHeaderView to update from the code. When I pull
Trying to set certain properties for an applications notifications in Growl for Windows. (Properties
I'm having the most difficult time trying to get the PayPal IPN subscription Id.
I'm trying to update a PHP module using yum, but am getting an error.
I am trying to write a query that pulls out the names of all
I can't get my subscription to update with my product and also duplicate the
My windows azure subscription has been cancelled. I want to update my credit card

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.