Say I have the following table:
1) I want to find records by Dates falling on Startdate or Promotedate.
Ex) I want records who started on oct-nov 2009 or who promoted on oct-nov 2009
select ID, FullName,Salary
Where sex IN (@sex) and (StartDate <= @sdate and StartDate > @sdate OR
promotedate <= @sdate and PromoteDate > @sdate)
2) I want to parse out last name only from FullName.
The full name is in this format ((lastname)) firstname
How can I parse out lastname in sql?