MSSQL query

Posted on 2012-09-01
Last Modified: 2012-09-02
i am using below custom SQL query
StockStatus > 0

now i want to create submenu, example perfume, category ID is 1842
i want to display all perfumes StockStatus > 0

I tried these different Code setups...and doesnt work
ProductCode IN (
SELECT ProductCode
WHERE Products_Joined.StockStatus > 0
AND Products_Joined.CategoryID = '1842'

StockStatus > 0 AND CategoryID = '1842'

SELECT ProductCode
WHERE Products_Joined.StockStatus > 0
AND CategoryID = '1842'

SELECT Products_Joined.ProductCode
FROM Products_Joined
JOIN Products_CategoryIDs ON Products_CategoryIDs.ProductID = Products_Joined.ProductID
WHERE Products_Joined.StockStatus > 0 AND Products_CategoryIDs.CategoryIDs = '1842'

can someone tell which sql query will do this
Question by:ammadeyy2020
    LVL 9

    Expert Comment

    Can you post error details

    Author Comment

    i am using volusion shopping cart
    so i am getting there custom error asking to contact customer service
    and they are unable to give any help regarding this
    LVL 142

    Accepted Solution

    we will need the exact error message that you get, otherwise we cannot solve this error...
    LVL 75

    Expert Comment

    by:Anthony Perkins
    can someone tell which sql query will do this
    I don't think so.  While there are many here that are very technically proficient, I don't know anyone that can read a crystal ball.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now