I have this code to find a space in the sql command to and return it with the database fields in crystal reports, but the charindex keeps returning zeros.
SELECT ALLEGATION, CHARINDEX(ALLEGATION, ' ', 1) AS SPACE
FROM ALLEGATIONS
WHY DOES IT KEEP SAYING 0?
It should be the opposite order:
SELECT ALLEGATION, CHARINDEX(' ', ALLEGATION, 1) AS SPACE FROM ALLEGATIONS