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 to create store procedures and pass values in SQL
setup Xsan with couple of Apple macs final cut pro
What technique is being used here?
WebSphere Federated Repositories
Crystal report 2008, draw graph with huge of data.
Move Mailbox Powershell Script (sending Welcome e-mail HTML format)
Cisco VPN client for Windows, use both RSA SecurID soft token and hard token
Assigning a GPO to specific users and one Server only ?
My CPU is running at 48C to 51C
Interview Question: Threads