Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Convert Access SQL to SQL Server SQL

$
0
0

Below are my two query's top is from Access bottom is from SQL Server.  I know the access query is correct, but for some reason they are both returning different values.  What did I type incorrectly in my SQL Server conversion query/

--Access SQL
SELECT Count(SalesTickets)
FROM tbl_TotalSalesInfo
WHERE (((employeeName) Not Like "*Man*"))
OR (((employeeName) Like "*Man*") AND ((disSign) Is Not Null));

--SQL Server SQL
SELECT
COUNT(CASE WHEN (employeeName NOT IN ('Manager')) OR (disSign IS NOT NULL AND employeeName IN ('Manager'))
THEN SalesTickets ELSE NULL END)
FROM TotalSalesInfo


Viewing all articles
Browse latest Browse all 23857

Trending Articles