Hi Would it be possible to do the following in TSQL stored procedure.
So if the "StudentSex" is null then leave it out of the where clause.
Quote:
SELECT STUDENTID, STUDENTNAME FROM STUDENTS WHERESTUDENTAGE = @STUDENTAGE IF(STUDENTSEX<>null) BEGIN AND STUDENTSEX = @STUDENTSEX END |