distinctcount in sql?

Posted on 2011-10-18
Last Modified: 2012-06-21
Here is code from the formula workshop in crystal reports:
if DistinctCount ({I_Ticket.Seat}, {Exchange_Table2.Listing_ID}) <> {Exchange_Table2.Qty} then "N"
else "Y"
I would like to be able to do this in sql server so that I can use this information to correct the value in exchange table 2.   So I guess the main question is:  How do I do distinctcount in sql server
Question by:vrosas_03
    1 Comment
    LVL 23

    Accepted Solution

    This is one example

    Open in new window


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    728 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

    21 Experts available now in Live!

    Get 1:1 Help Now