If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query Question - I don't know
Is there a way in a query to have let's say three fields and do this:
If this field is not null OR if this field is not null OR if this field is not null then do something? Is that possible? Thanks so much!!!! |
#2
|
|||
|
|||
Query Question - I don't know
Golfinray wrote:
Is there a way in a query to have let's say three fields and do this: If this field is not null OR if this field is not null OR if this field is not null then do something? Is that possible? Thanks so much!!!! It depends on what "doing something" means. It could very well be possible. You are going to need to be more specific. It always helps to show us a few rows of sample data, and then _show_ us what your desired results are. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
#3
|
|||
|
|||
Query Question - I don't know
Yes, if you know what to do in the negative. Note that I assume by "do
something" you mean compute something: iif( (field1 IS NULL) AND (field2 IS NULL) AND (field3 IS NULL), NULL, computeSomething( ) ) where computeSomething( ) can be a public user defined function, returning some value, in a standard module, but which can do something else too, as side effect, such as sending you an email. I assumed that in the negative, the result to return is NULL. Vanderghast, Access MVP "Golfinray" wrote in message ... Is there a way in a query to have let's say three fields and do this: If this field is not null OR if this field is not null OR if this field is not null then do something? Is that possible? Thanks so much!!!! |
#4
|
|||
|
|||
Query Question - I don't know
I didn't explain very well, sorry. I have fields of numbers and I would like
to return records only if any one or all of the 3 fields is null. So if any or all of the 3 fields in that record is null, I want to return that with the query. That information will go on a report. Then I know that one or more of them are missing. Thanks again!!! "Michel Walsh" wrote: Yes, if you know what to do in the negative. Note that I assume by "do something" you mean compute something: iif( (field1 IS NULL) AND (field2 IS NULL) AND (field3 IS NULL), NULL, computeSomething( ) ) where computeSomething( ) can be a public user defined function, returning some value, in a standard module, but which can do something else too, as side effect, such as sending you an email. I assumed that in the negative, the result to return is NULL. Vanderghast, Access MVP "Golfinray" wrote in message ... Is there a way in a query to have let's say three fields and do this: If this field is not null OR if this field is not null OR if this field is not null then do something? Is that possible? Thanks so much!!!! |
#5
|
|||
|
|||
Query Question - I don't know
In the SQL view, have something like:
SELECT * FROM myTable WHERE (field1 IS NULL) OR (field2 IS NULL) OR (field3 IS NULL) Vanderghast, Access MVP "Golfinray" wrote in message ... I didn't explain very well, sorry. I have fields of numbers and I would like to return records only if any one or all of the 3 fields is null. So if any or all of the 3 fields in that record is null, I want to return that with the query. That information will go on a report. Then I know that one or more of them are missing. Thanks again!!! "Michel Walsh" wrote: Yes, if you know what to do in the negative. Note that I assume by "do something" you mean compute something: iif( (field1 IS NULL) AND (field2 IS NULL) AND (field3 IS NULL), NULL, computeSomething( ) ) where computeSomething( ) can be a public user defined function, returning some value, in a standard module, but which can do something else too, as side effect, such as sending you an email. I assumed that in the negative, the result to return is NULL. Vanderghast, Access MVP "Golfinray" wrote in message ... Is there a way in a query to have let's say three fields and do this: If this field is not null OR if this field is not null OR if this field is not null then do something? Is that possible? Thanks so much!!!! |
Thread Tools | |
Display Modes | |
|
|