Microsoft
Software
Hardware
Network
Question : SQL Case
I have the following query, but i need to change it a little so that i have a case statement inserted.
SELECT
TblCustomer.TelNo1,
COUNT( TblCustomer.TelNo1) AS countDups
FROM
WHERE
(TblCustomerLog.CurrentCus
tomer = 1)
GROUP BY TelNo1
HAVING COUNT(TblCustomer.TelNo1)>
1
) AS a ON a.TelNo1 = TblCustomer.TelNo1
-- TblCustomer.TelNo1
-- (CASE
-- WHEN COUNT (TblCustomer.TelNo1) > 1
-- THEN 'Duplicate'
-- ELSE 'Unique'
-- END) AS countDups,
Answer : SQL Case
your code so far is a bit reduced, so it's not obvious to see where the subquery/join is happening
this must be removed, to get those with COUNT() = 1
HAVING COUNT(TblCustomer.TelNo1)> 1
Random Solutions
ORA: 6533 Subscript out of range
Enumerable or Strongly typed List of Guids
How can I force Graphics.MeasureString to consider the font style?
how can i get Hard Disk Serial number (unique) in C#.net web application ??
Transparent PNG IE8
Need help on rollover buttons in flash in Flash CS4 and AS 3
Windows Rights Management Server
Xenserver multipath issue with pool
I'll bet you can't pass this test about how Windows 7 explorer sorts directories by date?
How to convert non ansi outer join =* to ansi outer join