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
delphi Run once
Increment Value
Microsoft Word and outlook formatting problems
Cisco CallManager CRD Analysis and Reporting
Excel 2007 viewer error in Windows Server 2008 R2 terminal server (crash)
web forms: xForms or javascript forms: which one is the best?
Do you know a utility in Unix I could use that would compare 2 files (for ex:, files A.txt vs B.txt) and display the differences between the 2 files?
Cropping Photos Without Changing The Aspect Ratio in Fireworks 8
IIF Field Length Question
Sonic Wall Continuous Backup Problem