JustSomeDude
IS-IT--Management
Hi all --
I've tried searching around for the answers to my fairly simple questions, but can't seem to find them. I apologize if I've missed some really obvious thread and am re-visiting an old topic.
That said;
Is it possible to write a query that will consider conditions on more than one column? I have tried messing with the SQL, but for some reason it gives an error.
For example, I have a table with two columns, "Animal" and "Size". I want to be able to display rows where the Animal is like "bear" or "Tiger" or if the Size is like "Medium". My query has an OR condition across two columns. I can't seem to get this to work. I suppose I can do some stuff with CREATE and APPEND tables, but I am trying to avoid that.
Here is what I am trying to get:
ANIMALS SIZE
------- ----
Bear Large
Bearcat Small
Tiger Large
Cat Small
Ocelot Small
Chimp Medium
With my query: "Give me rows where ANIMALS is like "Bear*" or SIZE="Medium", I want to be returned "Bear", "Bearcat" and "Chimp". Unfortunately, I can't seem to make the OR condition include both columns ANIMALS and SIZE...
Any ideas that don't involve two queries and a couple CREATE and APPEND tables?
Thanks for any insight!
I've tried searching around for the answers to my fairly simple questions, but can't seem to find them. I apologize if I've missed some really obvious thread and am re-visiting an old topic.
That said;
Is it possible to write a query that will consider conditions on more than one column? I have tried messing with the SQL, but for some reason it gives an error.
For example, I have a table with two columns, "Animal" and "Size". I want to be able to display rows where the Animal is like "bear" or "Tiger" or if the Size is like "Medium". My query has an OR condition across two columns. I can't seem to get this to work. I suppose I can do some stuff with CREATE and APPEND tables, but I am trying to avoid that.
Here is what I am trying to get:
ANIMALS SIZE
------- ----
Bear Large
Bearcat Small
Tiger Large
Cat Small
Ocelot Small
Chimp Medium
With my query: "Give me rows where ANIMALS is like "Bear*" or SIZE="Medium", I want to be returned "Bear", "Bearcat" and "Chimp". Unfortunately, I can't seem to make the OR condition include both columns ANIMALS and SIZE...
Any ideas that don't involve two queries and a couple CREATE and APPEND tables?
Thanks for any insight!