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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:50:57+00:00 2026-06-15T12:50:57+00:00

`IF(@ParentField = ‘Reason for call – Primary Issue’) BEGIN DELETE FROM dbo.ControlBrandMapping CBM INNER

  • 0
    `IF(@ParentField = 'Reason for call - Primary Issue')
    BEGIN
        DELETE FROM dbo.ControlBrandMapping CBM
            INNER JOIN dbo.ControlManagement CM ON CM.ID = CBM.CONTROLID
                WHERE CM.DefaultName = 'Reason for call - Sub Issue' AND CBM.BRANDID = @BrandId
    END`

I tried my best to make it look as neat as possible.
I am getting this error – “Incorrect syntax near ‘CBM’.”
Please help

  • 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-15T12:50:59+00:00Added an answer on June 15, 2026 at 12:50 pm

    You are missing the alias CBM after the DELETE clause. Try this instead:

        DELETE CBM
        FROM dbo.ControlBrandMapping CBM
        INNER JOIN dbo.ControlManagement CM ON CM.ID = CBM.CONTROLID
        WHERE CM.DefaultName = 'Reason for call - Sub Issue' 
          AND @ParentField = 'Reason for call - Primary Issue'
          AND CBM.BRANDID = @BrandId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have the following code: class Parent { static string MyField = ParentField;
I'm running a query which looks like this SELECT parent.field, child.field FROM parent JOIN
I cannot seem to get hold of the parent varible from the child template,
Following on from this question: Referencing parent field on document creation I'm using the
I am trying to figure out how to execute a bulk delete on a
I have two queries. The first will return multiple rows: SELECT parent_entry_id,child_entry_id FROM exp_playa_relationships
My head hurts from thinking about an elegant solution to the following problem. I
I am having an issue in getting the data in the below loop ,even
My issue is that I never be able to run my android application in
I have a List with some tables from a database where each row contains

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.