itchyII
MIS
- Apr 10, 2001
- 167
Hi All,
I am pretty new to SQL. I have a simple query, and I am trying to figure out how to add a condition to my where clause. The query looks something like this:
What I would like to add now is a condition in the WHERE clause that will select on those records based on something like:
if tblItem.fldScopeId = 1
then tblItem.fldInDate <> tblItem.fldSchStart
else tblItem.fldInDate <> tblItem.fldStartDate
It sounds simple, but I don't know the syntax!
Thank you in advance!
I am pretty new to SQL. I have a simple query, and I am trying to figure out how to add a condition to my where clause. The query looks something like this:
Code:
SELECT tblItem.fldItemId, tblItem.fldInDate, tblItem.fldStartDate, tblItem.fldSchStart, tblItem.fldScopeId
FROM tblItem
What I would like to add now is a condition in the WHERE clause that will select on those records based on something like:
if tblItem.fldScopeId = 1
then tblItem.fldInDate <> tblItem.fldSchStart
else tblItem.fldInDate <> tblItem.fldStartDate
It sounds simple, but I don't know the syntax!
Thank you in advance!