Nov 4, 2006 #1 SMAlvarez Programmer Dec 4, 2005 27 US Ok lets say I have an area for STATE, AGE, and SALARY. And I want it to be like this: 1. state = new york 2. age = greater then 40 3. and salary greater then 20000 Do I need 3 actual if statements? or 3 ands? thanks for the help!
Ok lets say I have an area for STATE, AGE, and SALARY. And I want it to be like this: 1. state = new york 2. age = greater then 40 3. and salary greater then 20000 Do I need 3 actual if statements? or 3 ands? thanks for the help!
Nov 4, 2006 #2 fredericofonseca IS-IT--Management Jun 2, 2003 3,324 PT mixture of AND and IF's, but what you want there is still not very clear. Please post what you have tried so far, along with sample data, and sample output based on the data you supply. Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com Upvote 0 Downvote
mixture of AND and IF's, but what you want there is still not very clear. Please post what you have tried so far, along with sample data, and sample output based on the data you supply. Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com
Nov 4, 2006 Thread starter #3 SMAlvarez Programmer Dec 4, 2005 27 US I just need help with the if statement ie: if state = 'NEW YORK' AND salary > 20000 AND age > 40 can you use two ands like that? or is there another way? Upvote 0 Downvote
I just need help with the if statement ie: if state = 'NEW YORK' AND salary > 20000 AND age > 40 can you use two ands like that? or is there another way?
Nov 4, 2006 #5 Glenn9999 Programmer Jun 19, 2004 2,312 US uhhh...you basically got it... I like to put ()'s on each condition, more for readability than anything else. Upvote 0 Downvote
uhhh...you basically got it... I like to put ()'s on each condition, more for readability than anything else.
Nov 5, 2006 #6 webrabbit MIS Jan 31, 2003 1,059 US With only ANDs or only ORs, parentheses serve no purpose whatsoever. Upvote 0 Downvote