ADO Select Case When... statements?

From: Radu Stanciu (urgur_at_home.ro)
Date: 03/16/05

  • Next message: Del M: "Re: ADO Select Case When... statements?"
    Date: Wed, 16 Mar 2005 01:08:06 +0200
    
    

    Hi,

    I'm trying to run a query that sounds something like this:

    SELECT SUM(CASE WHEN Quantity=1 THEN 2 ELSE 3 END) FROM Inventory

    It's not the standard SQL syntax, but it's the closest I've found while searching the
    net for ADO examples. Does anyone have an exmaple on such a query? As silly as it may
    seems, I was unable to find anything pointing to this.

    Thanks,

    Radu Stanciu


  • Next message: Del M: "Re: ADO Select Case When... statements?"

    Relevant Pages

    • Re: Parameter Query Form Problem
      ... This is what I used to make my query, its was a Microsoft support site. ... controls on the form so it can run the query. ... ContractStartDate ... Combo Box for searching Customer Name ...
      (microsoft.public.access.formscoding)
    • Re: Parameter Query Form Problem
      ... Dim stDocName As String ... This is what I used to make my query, its was a Microsoft support site. ... controls on the form so it can run the query. ... Combo Box for searching Customer Name ...
      (microsoft.public.access.formscoding)
    • Re: Help with Union & lookup
      ... I don't see where you are searching the surname field in the query you posted. ... BTW that "LIKE" expression I'm using works fine in another SQL query but with 3 sets of brackets. ...
      (microsoft.public.access.queries)
    • Pasting text into a combo-box for browsing
      ... I'm trying to improve the searching ... The query does this concatenation and is sorted ascending on ... I do all this with the mouse after Finding a record: I highlight ... functionality, I'd sure be open to that as well! ...
      (microsoft.public.access.forms)
    • Re: What would you do with 10 Man Years?
      ... >> searching. ... All more the surprise when I realized that your sample query is an old ... to build data structures characterizing the ... > index to create a second unindexed set, ...
      (comp.lang.lisp)