Forum Replies Created

Viewing 2 posts - 16 through 17 (of 17 total)

  • RE: SQL for adding flags depending on criteria

    What I have is data like:

    CustId OrderIdCountUnique

    John Smith11

    John Smith10

    Ann James11

    Laura Simpson21

    Laura Simpson31

    Laura Simpson11

    James Wright11

    James Wright10

    Scott Campbell11

    The third...

  • RE: SQL for adding flags depending on criteria

    Both the customer ID and Order ID fields are a mix of nummers and letters.

    If I do:

    SELECT ...

    ,CASE WHEN SUM(Customer.CustomerID + Order.OrderID) > 1 THEN 1 ELSE 0 END

    FROM etc

    GROUP...

Viewing 2 posts - 16 through 17 (of 17 total)