I have this Query.
SELECT
Distinct
CASE CHARINDEX( '?', SessionURL)
WHEN 0 THEN SessionURL
ELSE LEFT(SessionURL, CHARINDEX( '?', SessionURL) - 1) END AS VisitPage , count(*) as [VisitTime]
FROM VistedURL
Its gives following result.
VisitPage VisitTime
a/default.aspx 99
a/home.aspx 15
a/admin/dashboard.aspx 05
a/contactus.aspx 54
a/admin/login.aspx 10
I want to use Not Like in above query.means:
WHERE SessionURL NOT LIKE '%admin%'
And remove the 3rd and 5th data of above result table which contain admin.But unable to use Not Like in above query.Thanks.
Please try the above query.
Also justcount(1)is better thancount(*)