From: Qaspec on 13 Aug 2010 13:02 What is the SQL Case Statement equivalent to the following SQL expression in Access? Thanks for any help. Count(IIf([HourCreated]=7,0)) AS 7
From: --CELKO-- on 13 Aug 2010 13:36 >> Count(IIf([HourCreated]=7,0)) AS 7 << None; you cannot name a data element 7 without using quoted identifiers. I think you might want: COUNT(NULLIF(creation_hr, 7)) AS seven
From: Tony Rogerson on 13 Aug 2010 14:30 case when HourCreated = 7 then 0 else null end AS [7] But you seem to be missing the "false" value so I've used Null above. Tony. "Qaspec" <Qaspec(a)discussions.microsoft.com> wrote in message news:CAA1B9F8-87D6-4188-95D3-225A86239BC6(a)microsoft.com... > What is the SQL Case Statement equivalent to the following SQL expression > in > Access? > Thanks for any help. > > Count(IIf([HourCreated]=7,0)) AS 7
|
Pages: 1 Prev: Update whit values from other table Next: Question about transactionnel replication |