English > Support

Using NULL in Advanced Search

<< < (2/10) > >>

rick.ca:
My position on using "0" as a rating for really really bad movies instead of the more obvious meaning of "unrated" hasn't changed...


--- Quote from: rick.ca on February 03, 2009, 02:01:58 am ---It can only be "bad" if you choose to look at it that way. So "0" means "unrated." Most would agree, any movie rated less than 5 is "bad." You can't possibly argue a scale from "1" meaning the worst movie of all time to "5" is insufficient to rate the nuances between bad movies. You can search for "rating <3 AND >0." Clicking on the extreme left-hand side of the stars graphic removes (or resets to 0, if you prefer) the rating.
--- End quote ---

Also, considering most professional reviewers use only four or five stars, we should be able to get by with ten. ;)

buah:
Ok, if I understood you well, and please correct me if not so, I need here to clarify some things.

I'm in the last phase of importing and updating all my movies to PVD - rating seen movies. So, I filtered movies to seen ones and that's how I got 2533 entries. Some of those 2533 seen movies are rated, and some not.

Of those 2533 how to get a list of only not rated movies?

The only logical answer for me was to apply IS NULL search because their rating field should be empty (uknown). That's how I got 1817 entries.

How to get a list of only rated movies?

I reset advanced search filter. The only logical answer for me was to apply IS NOT NULL search because their rating field should not be empty (filled in with some numbers, including zeros. That's how I got 2533 entries??? But how? It was supposed to be -1817 entries that aren't rated? Weren't the result should been 2533-1817=716?

Edit: None of my movies ever had rating "0", I just tested search against it.


Edit: corrected counting mistake, thx mgp

mgpw4me@yahoo.com:
Weren't the result should been 2533-1817=1716?   716

If you know that some fields have ratings, then you can use:
(rating is null or rating < 1) for unrated movies
(rating is not null and rating > 0) for rated movies.

buah:

--- Quote from: mgpw4me@yahoo.com on March 05, 2010, 06:00:54 pm ---Weren't the result should been 2533-1817=1716?   716

If you know that some fields have ratings, then you can use:
(rating is null or rating < 1) for unrated movies
(rating is not null and rating > 0) for rated movies.

--- End quote ---


1. Why it isn't possible to get desired result only with NULL search?
2. Tnx, but nope mgp, your tips don't work in my case, still same results... (1817 and 2533)

[attachment deleted by admin]

AimHere:
Did a little quick testing on this issue myself... what I've found is that "Rating = 0" and "Rating IS NULL" are equivalent for the purposes of Advanced Search.

I have 1364 movies in my database, and either of the above search criteria returns 1329 visible records. A search for "Rating > 0", on the other hand, returns 35 movies... 1329 + 35 = 1364. (Clearly I have some work to do regarding rating my movies, hehe.  ;D)

When editing a movie record that has any non-zero rating, you can actually enter "0" in the text box next to the stars and save the record... and the movie essentially becomes "unrated". (If you edit the movie record again, the text box will actually be blank now, but blank and "0" are still equivalent.) Same thing happens in edit mode when you click to the left of the leftmost star, or click-and-drag on the stars and move your mouse off the left end before releasing; the movie becomes unrated.

So, the search really boils down to:


* "Rating = 0" for Unrated movies [or "Rarin IS NULL" if yoiu prefer, either one will work the same
* "Rating > 0" for rated movies
Then, just be sure to use a rating of at least 0.5 (which may as well mean "absolute excrement"  ;D) when rating all your movies, and you're set. Never use a rating of "0" except to clear out the rating altogether.

What threw off your results using mgpw4me's suggestion was his inclusion of "rating is not null" in the second line.

Side note: I think the reason why "Rating IS NOT NULL" returns all records might be due to PVD actually assigning a value (in this case, zero) to the rating of EVERY record at the time of creation, and maintaining a value in that field at all times. A value of "zero" (meaning unrated) simply isn't shown visibly in the text box next to the stars. So, all records have some value for "Rating", and hence, the "Rating" field is never NULL.

Aimhere

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version