I am trying to apply an sql connection to retrieve data complying to a set of parameters as applied against the 2 fields
One field is period and the other field is session
The table contains many rows each with a period and session value as integer
Trying the following doesn’t seem to work, but not sure where it is going wrong, a pointer in the right direction would be great thanks
SELECT
YearS
,Period
,Session
,Order_Ref
FROM OrderDtes with(NoLock)
WHERE
YearS=’2014′ and (Period>=’7′ and Session>=’4′) and (Period<='8' and Session=4 seems to remove any sessions less than 4….and the session<=1 removes those sessions greater than 1…so effectively no sessions are returned
I have tried various bracketing but to no avail.
TIA
Alan