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
How do I calculate lowest point of expected variation?
Could not reliably determine the server's fully qualified when trying to restart https service
Remote Desktop not working via IP address
BCM, Business Contact Manager, 2010 RTM cannot connect to remote sql database
Group boxes on form -vb.net 2008 forms app
How do I get the selected value from WPF combobox
performance - NC Vc C index
Windows 2008 Domain Controller Unavailable (but working)
I can not print to tray two which has legal size paper in it. The printer is a HP 3005 pcl printer and there are other users that can print to this tray when printing legal documents.
Need vbs script to apply correct registry settings