Nov 4, 2006 #1 SMAlvarez Programmer Joined Dec 4, 2005 Messages 27 Location 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 Joined Jun 2, 2003 Messages 3,324 Location 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 Joined Dec 4, 2005 Messages 27 Location 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 Thread starter #4 SMAlvarez Programmer Joined Dec 4, 2005 Messages 27 Location US anyone? Upvote 0 Downvote
Nov 4, 2006 #5 Glenn9999 Programmer Joined Jun 19, 2004 Messages 2,312 Location 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 Joined Jan 31, 2003 Messages 1,059 Location US With only ANDs or only ORs, parentheses serve no purpose whatsoever. Upvote 0 Downvote