18.12.2011, 02:47
(
Последний раз редактировалось Calgon; 18.12.2011 в 03:38.
)
Theoretically, this should work: (credits)
(If that doesn't work, it's because of the two speech marks in the COUNT area, it works fine if you use one word without speech marks.)
You can just return the result, 0 if no, higher (or equal) 1 if so.
Also, a little tip: It's really not wise to use spaces for column names, it's more problematic. Use camel case.
Oh yeah, this code will only check replicates in the database already, not what criteria you specify.
Код:
SELECT COUNT('Email Address') AS NumOccurrences FROM Accounts HAVING ( COUNT(NumOccurrences) >= 1 )
You can just return the result, 0 if no, higher (or equal) 1 if so.
Also, a little tip: It's really not wise to use spaces for column names, it's more problematic. Use camel case.
Oh yeah, this code will only check replicates in the database already, not what criteria you specify.