Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single line code

Status
Not open for further replies.

aamkumar

Programmer
Apr 3, 2007
18
US

Can any one suggest some single line code for this instead of multiple lines

Code:
(({Month}= "DECEMBER" and 
 {YearNumber} = 2004)

 or ({Month}= "JANUARY" and 
{YearNumber} = 2005)

or ({Month}= "FEBRUARY" and 
{YearNumber}= 2005)


or ({Month}= "MARCH" and 
{YearNumber}= 2005))
 
But I have year 2004 also and it is for December only for 2004
 
How about this...

Year * 100 + Month Between 200412 And 200503


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Year*100+Month won't work if Month is a name (srting)

how about this --

Month+Yearnumber in ('DECEMBER2004','JANUARY2005','FEBRUARY2005','MARCH2005')

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top