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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:17:55+00:00 2026-05-27T19:17:55+00:00

work on sql-server-2005 SELECT A.specific_customization_id , A.customization_id , A.customization_value , A.customization_price , A.customization_cost ,

  • 0

work on sql-server-2005

  SELECT    A.specific_customization_id ,
            A.customization_id ,
            A.customization_value ,
            A.customization_price ,
            A.customization_cost ,
            A.customization_code ,
            A.customization_check ,
            A.sort_order ,
            A.option_code ,
            A.product_id ,
            A.image_1 ,
            A.image_2 ,
            A.MainProductID ,
            A.customization_product_id ,
            A.inactive ,
            A.customization_description ,
            A.customization_select ,
            A.UOM ,
            A.allow_recur ,
            auto_reorder = CASE A.MainProductID --it's an int type column
                             WHEN NULL THEN A.allow_recur
                             ELSE ( SELECT  allow_recur
                                    FROM    wc_product
                                    WHERE   product_id = A.MainProductID
                                  )
                           END
  FROM      dbo.wc_product_specific A
  WHERE     A.product_id = 1133

Using the above query I want to set auto_reorder column value .want to set two login

  1. When My MainProductID column is null I want to set allow_recur column value
  2. When it’s not null I want to set another table column value

My logic 2) works fine ,fail to understand why does 1) not work? Help me to fix the problem?

If have any query plz ask thanks in advance.

  • 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-27T19:17:56+00:00Added an answer on May 27, 2026 at 7:17 pm

    Does this work:?

    SELECT    A.specific_customization_id ,
                A.customization_id ,
                A.customization_value ,
                A.customization_price ,
                A.customization_cost ,
                A.customization_code ,
                A.customization_check ,
                A.sort_order ,
                A.option_code ,
                A.product_id ,
                A.image_1 ,
                A.image_2 ,
                A.MainProductID ,
                A.customization_product_id ,
                A.inactive ,
                A.customization_description ,
                A.customization_select ,
                A.UOM ,
                A.allow_recur ,
                A.auto_reorder = CASE  --it's an int type column
                                 WHEN A.MainProductID IS NULL THEN A.allow_recur
                                 ELSE B.allow_recur
                                 END
    
      FROM      dbo.wc_product_specific A
                left outer join wc_product B on  B.product_id = A.MainProductID
      WHERE     A.product_id = 1133
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi why doesn't this work in SQL Server 2005? select HALID, count(HALID) as CH
I work on an Internet-facing, ASP.NET-based product that uses SQL Server 2005. Most customers
Added: Working with SQL Server 2000 and 2005, so has to work on both.
At work we recently upgraded from Microsoft SQL Server 7 to SQL 2005. The
For instance, my query is like the following using SQL Server 2005: SELECT *
i work on sql 2005 server I have almost 350 000 insert scripts.. The
This is in SQL Server 2005. I work in a call center, where call
I am using SQL Server 2005. I am trying to SELECT a list of
We are using SQL Server 2005 at work and when development started it was
How do I make this work in SQL Server (2005)? The error message is

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.